aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2012-11-21 06:19:06 +0100
committerWolfram Sang <[email protected]>2013-01-21 16:26:29 +0100
commit85de7fac3990cf0c0736edc83856add2e648c76a (patch)
tree1f6600aceb397d1e12ae372a8674f3ca7fc3f5f6 /net/unix/af_unix.c
parent7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff)
i2c: mxs: Fix misuse init_completion
The init_completion() call does reinit not only the variable carrying the flag that the completion finished, but also initialized the waitqueue associated with the completion. On the contrary, the INIT_COMPLETION() call only reinits the flag. In case there was anything still stuck in the waitqueue, subsequent call to init_completion() would be able to create possible race condition. This patch uses the proper function and moves init_completion() into .probe() call of the driver, to be issued only once. Note that such scenario is impossible, since two threads can never enter the mxs_i2c_xfer_msg(), since whole this section is protected by mutex in I2C core. This by no means allows this issue to exit though. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions