1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/intel/iwlwifi/mvm
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
..
binding.c wifi: iwlwifi: mvm: vif preparation for MLO 2023-03-30 12:07:52 +02:00
coex.c wifi: iwlwifi: mvm: coex: start handling multiple links 2023-03-30 12:08:37 +02:00
constants.h iwlwifi: mvm: change old-SN drop threshold 2021-12-21 12:35:06 +02:00
d3.c wifi: iwlwifi: mvm: Fix -Warray-bounds bug in iwl_mvm_wait_d3_notif() 2023-06-06 11:11:14 +02:00
debugfs-vif.c wifi: iwlwifi: mvm: vif preparation for MLO 2023-03-30 12:07:52 +02:00
debugfs.c wifi: iwlwifi: mvm: check firmware response size 2023-04-18 14:47:56 +02:00
debugfs.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
ftm-initiator.c wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id 2023-05-16 10:27:04 -07:00
ftm-responder.c wifi: iwlwifi: mvm: make HLTK configuration for PASN station optional 2023-04-14 13:14:50 +02:00
fw-api.h iwlwifi: mvm/api: define system control command 2021-12-07 20:06:45 +02:00
fw.c wifi: iwlwifi: mvm: fix OEM's name in the tas approved list 2023-05-16 10:27:05 -07:00
led.c iwlwifi: mvm: Fix fall-through warnings for Clang 2020-12-11 20:20:24 +02:00
link.c wifi: iwlwifi: mvm: fix number of concurrent link checks 2023-05-16 10:27:04 -07:00
mac-ctxt.c wifi: iwlwifi: mvm: update mac id management 2023-04-18 14:47:54 +02:00
mac80211.c wifi: iwlwifi: Don't use valid_links to iterate sta links 2023-05-16 10:27:05 -07:00
Makefile wifi: iwlwifi: mvm: report hardware timestamps in RX/TX status 2023-03-22 13:16:35 +01:00
mld-key.c wifi: iwlwifi: mvm: implement key link switching 2023-04-17 09:53:25 +02:00
mld-mac.c wifi: iwlwifi: mvm: adopt the latest firmware API 2023-04-18 14:47:54 +02:00
mld-mac80211.c wifi: iwlwifi: mvm: fix number of concurrent link checks 2023-05-16 10:27:04 -07:00
mld-sta.c wifi: iwlwifi: mvm: fix initialization of a return value 2023-05-16 10:27:05 -07:00
mvm.h wifi: iwlwifi: mvm: rfi: disable RFI feature 2023-05-16 10:16:51 -07:00
nvm.c wifi: iwlwifi: mvm: don't trust firmware n_channels 2023-05-16 10:27:05 -07:00
offloading.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
ops.c wifi: iwlwifi: mvm: fix RFKILL report when driver is going down 2023-04-20 11:45:55 +02:00
phy-ctxt.c wifi: iwlwifi: mvm: vif preparation for MLO 2023-03-30 12:07:52 +02:00
power.c wifi: iwlwifi: mvm: remove chanctx WARN_ON 2023-03-30 12:08:41 +02:00
ptp.c wifi: iwlwifi: mvm: Use 64-bit division helper in iwl_mvm_get_crosstimestamp_fw() 2023-03-30 11:16:21 +02:00
quota.c wifi: iwlwifi: mvm: vif preparation for MLO 2023-03-30 12:07:52 +02:00
rfi.c wifi: iwlwifi: mvm: rfi: disable RFI feature 2023-05-16 10:16:51 -07:00
rs-fw.c wifi: iwlwifi: mvm: remove RS rate init update argument 2023-04-18 14:47:55 +02:00
rs.c wifi: iwlwifi: mvm: spin_lock_bh() to fix lockdep regression 2023-06-14 09:05:51 +02:00
rs.h wifi: iwlwifi: mvm: remove RS rate init update argument 2023-04-18 14:47:55 +02:00
rx.c wifi: iwlwifi: mvm: don't drop unencrypted MCAST frames 2023-04-14 13:14:49 +02:00
rxmq.c wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id 2023-05-16 10:27:04 -07:00
scan.c wifi: iwlwifi: mei: make mei filtered scan more aggressive 2023-04-20 11:45:55 +02:00
sf.c wifi: iwlwifi: mvm: add MLO support to SF - use sta pointer 2023-04-18 14:47:56 +02:00
sta.c wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id 2023-05-16 10:27:04 -07:00
sta.h wifi: iwlwifi: mvm: remove RS rate init update argument 2023-04-18 14:47:55 +02:00
tdls.c wifi: iwlwifi: mvm: sta preparation for MLO 2023-03-30 12:07:52 +02:00
testmode.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
time-event.c wifi: iwlwifi: mvm: add cancel/remain_on_channel for MLD mode 2023-03-30 12:07:53 +02:00
time-event.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
time-sync.c wifi: iwlwifi: mvm: support enabling and disabling HW timestamping 2023-03-22 13:16:37 +01:00
time-sync.h wifi: iwlwifi: mvm: support enabling and disabling HW timestamping 2023-03-22 13:16:37 +01:00
tt.c Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
tx.c wifi: iwlwifi: mvm: fix access to fw_id_to_mac_id 2023-05-16 10:27:04 -07:00
utils.c wifi: iwlwifi: mvm: coex: start handling multiple links 2023-03-30 12:08:37 +02:00
vendor-cmd.c iwlwifi: mvm: return value for request_ownership 2022-03-02 22:37:25 +01:00