diff options
author | 2023-07-17 22:47:24 -0400 | |
---|---|---|
committer | 2023-08-03 12:19:44 +0300 | |
commit | 8198950ccb7d311f8b4389441d8dcb597f926340 (patch) | |
tree | c421323a66966082f6a3b1197b06c53826bc17b6 /net/core/dev_ioctl.c | |
parent | wifi: ath12k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED (diff) | |
download | wireguard-linux-8198950ccb7d311f8b4389441d8dcb597f926340.tar.xz wireguard-linux-8198950ccb7d311f8b4389441d8dcb597f926340.zip |
wifi: ath12k: avoid deadlock by change ieee80211_queue_work for regd_update_work
Deadlock is easily happened while shutdown wlan interface such as run
"ifconfig wlan0 down".
The reason is because when ar->regd_update_work is ran, it will
call wiphy_lock(ar->hw->wiphy) in function ath12k_regd_update() which
is running in workqueue of ieee80211_local queued by ieee80211_queue_work().
Another thread from "ifconfig wlan0 down" will also accuqire the lock
by wiphy_lock(sdata->local->hw.wiphy) in function ieee80211_stop(), and
then it call ieee80211_stop_device() to flush_workqueue(local->workqueue),
this will wait the workqueue of ieee80211_local finished. Then deadlock
will happen easily if the two thread run meanwhile.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230718024724.29120-1-quic_wgong@quicinc.com
Diffstat (limited to 'net/core/dev_ioctl.c')
0 files changed, 0 insertions, 0 deletions