summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_posix_unittest.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 21:00:50 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-20 21:00:50 +0000
commit7e3d75264e9fc8577743a0b3c26ffe4d5e95697c (patch)
tree15a2b4ce75ca1b7f52dacefa68ac267c0eaf404e /ipc/ipc_channel_posix_unittest.cc
parent26b3abb1724fa02e4464cf3d23f0e20ee3b18efc (diff)
downloadchromium_src-7e3d75264e9fc8577743a0b3c26ffe4d5e95697c.zip
chromium_src-7e3d75264e9fc8577743a0b3c26ffe4d5e95697c.tar.gz
chromium_src-7e3d75264e9fc8577743a0b3c26ffe4d5e95697c.tar.bz2
Eliminate a potential race in IPC::ChannelProxy
Doing the following steps with ChannelProxy leads to a data race: 1) Create the ChannelProxy, but don't initialize it. 2) Add a filter. 3) Init the ChannelProxy. The problem is, AddFilter() posts a task from the Listener thread to the IPC task runner to do OnAddFilter. Prior to this patch, OnAddFilter will try to read channel_ even though channel_ may not have been initialized, and it's accessed without any synchronization. This patch only really adds the filter if peer_pid_ has been set on the IPC::Channel thread; otherwise, it waits until the connection has been established to really add filters. See the bug for more detail. BUG=244383 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256188 Review URL: https://codereview.chromium.org/183553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix_unittest.cc')
0 files changed, 0 insertions, 0 deletions