mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 11:40:19 -04:00
wifi: rtl8xxxu: add cancel_work_sync() for c2hcmd_work
The workqueue might still be running, when the driver is stopped. To
avoid a use-after-free, call cancel_work_sync() in rtl8xxxu_stop().
Fixes: e542e66b7c ("rtl8xxxu: add bluetooth co-existence support for single antenna")
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240111163628.320697-2-martin.kaistra@linutronix.de
This commit is contained in:
committed by
Kalle Valo
parent
178cc55d51
commit
1213acb478
@@ -7480,6 +7480,7 @@ static void rtl8xxxu_stop(struct ieee80211_hw *hw)
|
||||
if (priv->usb_interrupts)
|
||||
rtl8xxxu_write32(priv, REG_USB_HIMR, 0);
|
||||
|
||||
cancel_work_sync(&priv->c2hcmd_work);
|
||||
cancel_delayed_work_sync(&priv->ra_watchdog);
|
||||
|
||||
rtl8xxxu_free_rx_resources(priv);
|
||||
|
||||
Reference in New Issue
Block a user