aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hortmann <[email protected]>2023-09-24 21:51:02 +0200
committerGreg Kroah-Hartman <[email protected]>2023-09-26 11:14:32 +0200
commitf4050ec5b906067f71f5a490fa0b1f2ea853eee8 (patch)
tree1295c26a49e44ef55a44cd0a01c5af6177018127
parentd17631c44dea13f7cd6bced705b5c8c8c0bf69c1 (diff)
staging: rtl8192e: Unlock mutex for one line in rtllib_stop_protocol()
The following command uses the mutex ieee->wx_mutex: cancel_delayed_work_sync(&ieee->associate_retry_wq) Therefore it cannot be canceled with ieee->wx_mutex locked. rtllib_stop_protocol() is always called with ieee->wx_mutex locked so according line can be unlocked. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/ffe60e8f6e29197f331e239ab38154da97c743be.1695582999.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index c874468d075c..72d0225dfdf1 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2307,7 +2307,9 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
}
del_timer_sync(&ieee->associate_timer);
+ mutex_unlock(&ieee->wx_mutex);
cancel_delayed_work_sync(&ieee->associate_retry_wq);
+ mutex_lock(&ieee->wx_mutex);
cancel_delayed_work_sync(&ieee->link_change_wq);
rtllib_stop_scan(ieee);