Commit f1a0898
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: a8938bc ("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>1 parent d094482 commit f1a0898
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2692 | 2692 | | |
2693 | 2693 | | |
2694 | 2694 | | |
2695 | | - | |
| 2695 | + | |
2696 | 2696 | | |
2697 | 2697 | | |
2698 | 2698 | | |
| |||
2707 | 2707 | | |
2708 | 2708 | | |
2709 | 2709 | | |
2710 | | - | |
| 2710 | + | |
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
| |||
3264 | 3264 | | |
3265 | 3265 | | |
3266 | 3266 | | |
3267 | | - | |
| 3267 | + | |
3268 | 3268 | | |
3269 | 3269 | | |
3270 | 3270 | | |
3271 | | - | |
| 3271 | + | |
3272 | 3272 | | |
3273 | 3273 | | |
3274 | 3274 | | |
| |||
4117 | 4117 | | |
4118 | 4118 | | |
4119 | 4119 | | |
4120 | | - | |
| 4120 | + | |
4121 | 4121 | | |
4122 | | - | |
| 4122 | + | |
4123 | 4123 | | |
4124 | 4124 | | |
4125 | 4125 | | |
| |||
0 commit comments