Patch "wil6210: fix protection against connections during reset" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
wil6210: fix protection against connections during reset
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
wil6210-fix-protection-against-connections-during-reset.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Hamad Kadmany <[email protected]>
Date: Wed, 5 Apr 2017 14:58:08 +0300
Subject: wil6210: fix protection against connections during reset
From: Hamad Kadmany <[email protected]>
[ Upstream commit b819447dfc4bd120c9d6cd8521252d544fce8fe7 ]
Existing code that ignores connection events during reset flow will never take effect since it locks the same mutex taken by the reset flow.
In addition, in case of unsolicited disconnect events ignore those as well since device is about to get reset.
--- drivers/net/wireless/ath/wil6210/wmi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/wil6210/wmi.c +9 -2
@@ -501,16 +501,16 @@ static void wmi_evt_connect(struct wil62 assoc_resp_ielen =0 ; } -mutex_lock (&wil->mutex);if (test_bit (wil_status_resetting, wil->status) || !test_bit (wil_status_fwready, wil->status)) {wil_err (wil,"status_resetting, cancel connect event, CID %d\n" , evt->cid); -mutex_unlock (&wil->mutex);/* no need for cleanup, wil_reset will do that */ return ; } +mutex_lock (&wil->mutex); +if ((wdev->iftype ==NL80211_IFTYPE_STATION ) || (wdev->iftype ==NL80211_IFTYPE_P2P_CLIENT )) {if (!test_bit (wil_status_fwconnecting, wil->status)) {
@@ -608,6 +608,13 @@ static void wmi_evt_disconnect(struct wi wil->sinfo_gen++; +if (test_bit (wil_status_resetting, wil->status) || + !test_bit (wil_status_fwready, wil->status)) { +wil_err (wil,"status_resetting, cancel disconnect event\n" ); +/* no need for cleanup, wil_reset will do that */ +return ; + } +mutex_lock (&wil->mutex);wil6210_disconnect (wil, evt->bssid, reason_code, true);mutex_unlock (&wil->mutex);
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/wil6210-fix-protection-against-connections-during-reset.patch