Revision 85de7fac3990cf0c0736edc83856add2e648c76a authored by Marek Vasut on 21 November 2012, 05:19:06 UTC, committed by Wolfram Sang on 21 January 2013, 15:26:29 UTC
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 <marex@denx.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
1 parent 7d1f9ae
History
File Mode Size
Kconfig -rw-r--r-- 473 bytes
Makefile -rw-r--r-- 251 bytes
attr.c -rw-r--r-- 2.6 KB
bfind.c -rw-r--r-- 4.6 KB
bitmap.c -rw-r--r-- 5.8 KB
bnode.c -rw-r--r-- 11.3 KB
brec.c -rw-r--r-- 13.5 KB
btree.c -rw-r--r-- 8.8 KB
btree.h -rw-r--r-- 5.4 KB
catalog.c -rw-r--r-- 9.2 KB
dir.c -rw-r--r-- 7.7 KB
extent.c -rw-r--r-- 13.5 KB
hfs.h -rw-r--r-- 9.1 KB
hfs_fs.h -rw-r--r-- 8.7 KB
inode.c -rw-r--r-- 18.3 KB
mdb.c -rw-r--r-- 10.4 KB
part_tbl.c -rw-r--r-- 2.9 KB
string.c -rw-r--r-- 3.8 KB
super.c -rw-r--r-- 12.4 KB
sysdep.c -rw-r--r-- 1.0 KB
trans.c -rw-r--r-- 3.4 KB

back to top