wil6210: fix protection of wil->scan_request
authorLior David <qca_liord@qca.qualcomm.com>
Mon, 22 Aug 2016 09:42:19 +0000 (12:42 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 31 Aug 2016 07:31:03 +0000 (10:31 +0300)
commit5ffae43208ec160e584117fabee2cddc5ad0e39a
tree7d6485065f6fecd64b20deacd3bdf66c711a8c2a
parent47b1848d9fde5daf102f599be6e589a1d3c8da7d
wil6210: fix protection of wil->scan_request

Currently the places that check wil->scan_request and
call cfg80211_scan_done are not consistently protected,
so there is a risk that cfg80211_scan_done will be called
with NULL scan_request, causing a kernel crash.
Fix this by using p2p_wdev_mutex in few other places
that access scan_request. This makes sense since
scan_request may point to p2p_wdev, and it is not worth
the extra complexity of adding a new mutex.

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/wil6210.h
drivers/net/wireless/ath/wil6210/wmi.c