Commit 078a84e8 authored by rockot's avatar rockot Committed by Commit bot

Fix data race in IPC::ChannelProxy

Fixes a missing lock acquisition from the listener thread when
accessing |channel_|.

Also removes the TSAN suppression for this bug.

BUG=628481
TBR=glider@chromium.org for suppression removal

Review-Url: https://codereview.chromium.org/2158893002
Cr-Commit-Position: refs/heads/master@{#406033}
parent 1352ffd4
......@@ -267,9 +267,6 @@ char kTSanDefaultSuppressions[] =
// http://crbug.com/582274
"race:usrsctp_close\n"
// http://crbug.com/628481
"race:IPC::SyncChannel::SyncContext::OnChannelClose\n"
// End of suppressions.
; // Please keep this semicolon.
......
......@@ -324,6 +324,8 @@ void ChannelProxy::Context::OnDispatchConnected() {
if (channel_connected_called_)
return;
{
base::AutoLock l(channel_lifetime_lock_);
if (channel_) {
Channel::AssociatedInterfaceSupport* associated_interface_support =
channel_->GetAssociatedInterfaceSupport();
......@@ -332,6 +334,7 @@ void ChannelProxy::Context::OnDispatchConnected() {
*associated_interface_support->GetAssociatedGroup()));
}
}
}
channel_connected_called_ = true;
if (listener_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment