1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/intel/iwlwifi/mvm
Jose Ignacio Tornos Martinez 14a3aacf51 wifi: iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue
After successfull station association, if station queues are disabled for
some reason, the related lists are not emptied. So if some new element is
added to the list in iwl_mvm_mac_wake_tx_queue, it can match with the old
one and produce a BUG like this:

[   46.535263] list_add corruption. prev->next should be next (ffff94c1c318a360), but was 0000000000000000. (prev=ffff94c1d02d3388).
[   46.535283] ------------[ cut here ]------------
[   46.535284] kernel BUG at lib/list_debug.c:26!
[   46.535290] invalid opcode: 0000 [#1] PREEMPT SMP PTI
[   46.585304] CPU: 0 PID: 623 Comm: wpa_supplicant Not tainted 5.19.0-rc3+ #1
[   46.592380] Hardware name: Dell Inc. Inspiron 660s/0478VN       , BIOS A07 08/24/2012
[   46.600336] RIP: 0010:__list_add_valid.cold+0x3d/0x3f
[   46.605475] Code: f2 4c 89 c1 48 89 fe 48 c7 c7 c8 40 67 93 e8 20 cc fd ff 0f 0b 48 89 d1 4c 89 c6 4c 89 ca 48 c7 c7 70 40 67 93 e8 09 cc fd ff <0f> 0b 48 89 fe 48 c7 c7 00 41 67 93 e8 f8 cb fd ff 0f 0b 48 89 d1
[   46.624469] RSP: 0018:ffffb20800ab76d8 EFLAGS: 00010286
[   46.629854] RAX: 0000000000000075 RBX: ffff94c1c318a0e0 RCX: 0000000000000000
[   46.637105] RDX: 0000000000000201 RSI: ffffffff9365e100 RDI: 00000000ffffffff
[   46.644356] RBP: ffff94c1c5f43370 R08: 0000000000000075 R09: 3064316334396666
[   46.651607] R10: 3364323064316334 R11: 39666666663d7665 R12: ffff94c1c5f43388
[   46.658857] R13: ffff94c1d02d3388 R14: ffff94c1c318a360 R15: ffff94c1cf2289c0
[   46.666108] FS:  00007f65634ff7c0(0000) GS:ffff94c1da200000(0000) knlGS:0000000000000000
[   46.674331] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   46.680170] CR2: 00007f7dfe984460 CR3: 000000010e894003 CR4: 00000000000606f0
[   46.687422] Call Trace:
[   46.689906]  <TASK>
[   46.691950]  iwl_mvm_mac_wake_tx_queue+0xec/0x15c [iwlmvm]
[   46.697601]  ieee80211_queue_skb+0x4b3/0x720 [mac80211]
[   46.702973]  ? sta_info_get+0x46/0x60 [mac80211]
[   46.707703]  ieee80211_tx+0xad/0x110 [mac80211]
[   46.712355]  __ieee80211_tx_skb_tid_band+0x71/0x90 [mac80211]
...

In order to avoid this problem, we must also remove the related lists when
station queues are disabled.

Fixes: cfbc6c4c5b ("iwlwifi: mvm: support mac80211 TXQs model")
Reported-by: Takayuki Nagata <tnagata@redhat.com>
Reported-by: Petr Stourac <pstourac@redhat.com>
Tested-by: Petr Stourac <pstourac@redhat.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220719153542.81466-1-jtornosm@redhat.com
2022-07-27 13:48:19 +03:00
..
binding.c iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
coex.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
constants.h iwlwifi: mvm: change old-SN drop threshold 2021-12-21 12:35:06 +02:00
d3.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
debugfs-vif.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
debugfs.c wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
debugfs.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
ftm-initiator.c wifi: iwlwifi: mvm: fix clang -Wformat warnings 2022-07-27 13:47:56 +03:00
ftm-responder.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
fw-api.h iwlwifi: mvm/api: define system control command 2021-12-07 20:06:45 +02:00
fw.c iwlwifi: mvm: add OTP info in case of init failure 2022-05-18 12:54:08 +02:00
led.c iwlwifi: mvm: Fix fall-through warnings for Clang 2020-12-11 20:20:24 +02:00
mac-ctxt.c wifi: mac80211: return a beacon for a specific link 2022-06-20 12:57:08 +02:00
mac80211.c wifi: mac80211: replace link_id with link_conf in switch/(un)assign_vif_chanctx() 2022-07-15 11:43:20 +02:00
Makefile iwlwifi: mvm: add vendor commands needed for iwlmei 2021-11-26 18:31:48 +02:00
mvm.h iwlwifi: mvm: remove vif_count 2022-05-18 12:54:09 +02:00
nvm.c iwlwifi: mvm: fix WGDS table print in iwl_mvm_chub_update_mcc() 2021-10-28 12:04:11 +03:00
offloading.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
ops.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
phy-ctxt.c iwlwifi: mvm: move only to an enabled channel 2022-02-18 10:40:55 +02:00
power.c wifi: mac80211: move ps setting to vif config 2022-07-15 11:43:15 +02:00
quota.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
rfi.c iwlwifi: mvm: rfi: use kmemdup() to replace kzalloc + memcpy 2022-02-18 10:40:56 +02:00
rs-fw.c mac80211: prepare sta handling for MLO support 2022-04-11 16:42:03 +02:00
rs.c wifi: mac80211: move ps setting to vif config 2022-07-15 11:43:15 +02:00
rs.h iwlwifi: mvm: Support version 3 of tlc_update_notif. 2021-10-22 10:49:00 +03:00
rx.c iwlwifi: mvm: always tell the firmware to accept MCAST frames in BSS 2022-05-18 12:54:08 +02:00
rxmq.c iwlwifi: avoid void pointer arithmetic 2022-02-18 10:40:50 +02:00
scan.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
sf.c wifi: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
sta.c wifi: iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue 2022-07-27 13:48:19 +03:00
sta.h iwlwifi: mvm: offload channel switch timing to FW 2022-02-18 10:40:49 +02:00
tdls.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +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: mac80211: move interface config to new struct 2022-06-20 12:55:03 +02:00
time-event.h iwlwifi: use SPDX tags 2020-12-10 00:15:31 +02:00
tt.c iwlwifi: mvm: add support for CT-KILL notification version 2 2022-02-18 10:40:51 +02:00
tx.c wifi: mac80211: move some future per-link data to bss_conf 2022-06-20 12:55:01 +02:00
utils.c wifi: mac80211: make some SMPS code MLD-aware 2022-06-20 12:55:30 +02:00
vendor-cmd.c iwlwifi: mvm: return value for request_ownership 2022-03-02 22:37:25 +01:00