1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless
Hugh Dickins f1a0898b5d wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression
Lockdep on 6.4-rc on ThinkPad X1 Carbon 5th says
=====================================================
WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
6.4.0-rc5 #1 Not tainted
-----------------------------------------------------
kworker/3:1/49 [HC0[0]:SC0[4]:HE1:SE0] is trying to acquire:
ffff8881066fa368 (&mvm_sta->deflink.lq_sta.rs_drv.pers.lock){+.+.}-{2:2}, at: rs_drv_get_rate+0x46/0xe7

and this task is already holding:
ffff8881066f80a8 (&sta->rate_ctrl_lock){+.-.}-{2:2}, at: rate_control_get_rate+0xbd/0x126
which would create a new lock dependency:
 (&sta->rate_ctrl_lock){+.-.}-{2:2} -> (&mvm_sta->deflink.lq_sta.rs_drv.pers.lock){+.+.}-{2:2}

but this new dependency connects a SOFTIRQ-irq-safe lock:
 (&sta->rate_ctrl_lock){+.-.}-{2:2}
etc. etc. etc.

Changing the spin_lock() in rs_drv_get_rate() to spin_lock_bh() was not
enough to pacify lockdep, but changing them all on pers.lock has worked.

Fixes: a8938bc881 ("wifi: iwlwifi: mvm: Add locking to the rate read flow")
Signed-off-by: Hugh Dickins <hughd@google.com>
Link: https://lore.kernel.org/r/79ffcc22-9775-cb6d-3ffd-1a517c40beef@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2023-06-14 09:05:51 +02:00
..
admtek
ath Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
atmel wifi: atmel: Fix atmel_private_handler array size 2022-11-01 12:30:22 +02:00
broadcom wifi: b43: fix incorrect __packed annotation 2023-05-17 09:24:09 +03:00
cisco wifi: airo: remove ISA_DMA_API dependency 2023-04-20 15:38:27 +03:00
intel wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression 2023-06-14 09:05:51 +02:00
intersil net: add missing includes of linux/net.h 2023-01-27 11:19:45 +00:00
legacy wifi: rndis_wlan: Replace fake flex-array with flexible-array member 2023-03-31 17:48:27 +03:00
marvell spi: Updates for v6.4 2023-04-27 11:02:26 -07:00
mediatek wifi: mt76: mt7996: fix possible NULL pointer dereference in mt7996_mac_write_txwi() 2023-06-01 16:17:33 +03:00
microchip Merge wireless into wireless-next 2023-01-17 13:36:25 +02:00
purelifi wifi: plfxlc: fix potential memory leak in __lf_x_usb_enable_rx() 2022-11-28 15:56:17 +02:00
quantenna wifi: qtnfmac: use struct_size and size_sub for payload length 2023-03-13 15:44:29 +02:00
ralink wifi: rt2x00: Fix memory leak when handling surveys 2023-04-03 16:44:27 +03:00
realtek wifi: rtw89: remove redundant check of entering LPS 2023-06-01 16:16:41 +03:00
rsi wifi: rsi: Slightly simplify rsi_set_channel() 2023-03-31 17:45:50 +03:00
silabs spi: Updates for v6.4 2023-04-27 11:02:26 -07:00
st net: Replace all spi->chip_select and spi->cs_gpiod references with function call 2023-03-11 12:34:02 +00:00
ti net: Use of_property_read_bool() for boolean properties 2023-03-16 17:41:28 +00:00
virtual mac80211_hwsim: fix memory leak in hwsim_new_radio_nl 2023-05-16 10:29:34 -07:00
zydas wifi: zd1211rw: remove redundant decls 2023-02-13 19:25:47 +02:00
Kconfig wifi: move raycs, wl3501 and rndis_wlan to legacy directory 2023-03-13 15:42:14 +02:00
Makefile wifi: move raycs, wl3501 and rndis_wlan to legacy directory 2023-03-13 15:42:14 +02:00