wil6210: fix race conditions in p2p listen and search
authorLior David <qca_liord@qca.qualcomm.com>
Tue, 1 Mar 2016 17:18:14 +0000 (19:18 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 7 Mar 2016 09:43:20 +0000 (11:43 +0200)
commit280ab987ef21d1c196acb3af4663a99f94d9da00
treeb853e200d91f4acaab7d09b00aa2b628da86aaa2
parent4332cac17b5c0cb80d8b99fda33a0faad3238b0e
wil6210: fix race conditions in p2p listen and search

Fix 2 race conditions found during test runs of P2P discovery:
1. Because wil_p2p_cancel_listen was not protected, user space
could start a new P2P listen/search before wmi_stop_discovery
completed. This caused a crash in the firmware.
2. In P2P listen, when listen timer expires and user space calls
cancel_remain_on_channel at the same time, code could send the
cfg80211_remain_on_channel_expired notification twice.

Added protections with wil->mutex to several places that call
wmi_stop_discovery.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/wil6210/cfg80211.c
drivers/net/wireless/ath/wil6210/main.c
drivers/net/wireless/ath/wil6210/p2p.c
drivers/net/wireless/ath/wil6210/wil6210.h
This page took 0.025628 seconds and 5 git commands to generate.