From f4050ec5b906067f71f5a490fa0b1f2ea853eee8 Mon Sep 17 00:00:00 2001 From: Philipp Hortmann Date: Sun, 24 Sep 2023 21:51:02 +0200 Subject: [PATCH] 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 Link: https://lore.kernel.org/r/ffe60e8f6e29197f331e239ab38154da97c743be.1695582999.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8192e/rtllib_softmac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index c874468d075c4..72d0225dfdf18 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); -- 2.30.2