summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/main.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-03-01 19:18:14 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2016-03-07 11:43:20 +0200
commit280ab987ef21d1c196acb3af4663a99f94d9da00 (patch)
treeb853e200d91f4acaab7d09b00aa2b628da86aaa2 /drivers/net/wireless/ath/wil6210/main.c
parent4332cac17b5c0cb80d8b99fda33a0faad3238b0e (diff)
downloadlinux-stable-280ab987ef21d1c196acb3af4663a99f94d9da00.tar.gz
linux-stable-280ab987ef21d1c196acb3af4663a99f94d9da00.tar.bz2
linux-stable-280ab987ef21d1c196acb3af4663a99f94d9da00.zip
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>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/main.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index e09e9bb28e39..05a4ae7a7765 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -984,7 +984,7 @@ int __wil_down(struct wil6210_priv *wil)
}
wil_enable_irq(wil);
- wil_p2p_stop_discovery(wil);
+ (void)wil_p2p_stop_discovery(wil);
if (wil->scan_request) {
wil_dbg_misc(wil, "Abort scan_request 0x%p\n",