aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <[email protected]>2013-03-16 01:47:05 +0000
committerJohn W. Linville <[email protected]>2013-03-18 19:20:36 +0000
commit00d7ea11ff0783e24fe70778f3141270b561aaa1 (patch)
tree7b1275391f76d2202dc884c9a2b53e0715127c3b /net/unix/af_unix.c
parentath9k: limit tx path hang check to normal data queues (diff)
downloadkernel-00d7ea11ff0783e24fe70778f3141270b561aaa1.tar.gz
kernel-00d7ea11ff0783e24fe70778f3141270b561aaa1.zip
mwifiex: fix race when queuing commands
Running the following script repeatedly on XO-4 with SD8787 produces command timeout and system lockup. insmod mwifiex_sdio.ko sleep 1 ifconfig eth0 up iwlist eth0 scan & sleep 0.5 rmmod mwifiex_sdio mwifiex_send_cmd_async() is called for sync as well as async commands. (mwifiex_send_cmd_sync() internally calls it for sync command.) "adapter->cmd_queued" gets filled inside mwifiex_send_cmd_async() routine for both types of commands. But it is used only for sync commands in mwifiex_wait_queue_complete(). This could lead to a race when two threads try to queue a sync command with another sync/async command simultaneously. Get rid of global variable and pass command node as a parameter to mwifiex_wait_queue_complete() to fix the problem. Cc: <[email protected]> # 3.8 Reported-by: Daniel Drake <[email protected]> Tested-by: Daniel Drake <[email protected]> Tested-by: Marco Cesarano <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions