Alexander Wetzel
187523fa7c
wifi: mac80211: sdata can be NULL during AMPDU start
...
commit 69403bad97aa0162e3d7911b27e25abe774093df upstream.
ieee80211_tx_ba_session_handle_start() may get NULL for sdata when a
deauthentication is ongoing.
Here a trace triggering the race with the hostapd test
multi_ap_fronthaul_on_ap:
(gdb) list *drv_ampdu_action+0x46
0x8b16 is in drv_ampdu_action (net/mac80211/driver-ops.c:396).
391 int ret = -EOPNOTSUPP;
392
393 might_sleep();
394
395 sdata = get_bss_sdata(sdata);
396 if (!check_sdata_in_driver(sdata))
397 return -EIO;
398
399 trace_drv_ampdu_action(local, sdata, params);
400
wlan0: moving STA 02:00:00:00:03:00 to state 3
wlan0: associated
wlan0: deauthenticating from 02:00:00:00:03:00 by local choice (Reason: 3=DEAUTH_LEAVING)
wlan3.sta1: Open BA session requested for 02:00:00:00:00:00 tid 0
wlan3.sta1: dropped frame to 02:00:00:00:00:00 (unauthorized port)
wlan0: moving STA 02:00:00:00:03:00 to state 2
wlan0: moving STA 02:00:00:00:03:00 to state 1
wlan0: Removed STA 02:00:00:00:03:00
wlan0: Destroyed STA 02:00:00:00:03:00
BUG: unable to handle page fault for address: fffffffffffffb48
PGD 11814067 P4D 11814067 PUD 11816067 PMD 0
Oops: 0000 [#1 ] PREEMPT SMP PTI
CPU: 2 PID: 133397 Comm: kworker/u16:1 Tainted: G W 6.1.0-rc8-wt+ #59
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-20220807_005459-localhost 04/01/2014
Workqueue: phy3 ieee80211_ba_session_work [mac80211]
RIP: 0010:drv_ampdu_action+0x46/0x280 [mac80211]
Code: 53 48 89 f3 be 89 01 00 00 e8 d6 43 bf ef e8 21 46 81 f0 83 bb a0 1b 00 00 04 75 0e 48 8b 9b 28 0d 00 00 48 81 eb 10 0e 00 00 <8b> 93 58 09 00 00 f6 c2 20 0f 84 3b 01 00 00 8b 05 dd 1c 0f 00 85
RSP: 0018:ffffc900025ebd20 EFLAGS: 00010287
RAX: 0000000000000000 RBX: fffffffffffff1f0 RCX: ffff888102228240
RDX: 0000000080000000 RSI: ffffffff918c5de0 RDI: ffff888102228b40
RBP: ffffc900025ebd40 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888118c18ec0
R13: 0000000000000000 R14: ffffc900025ebd60 R15: ffff888018b7efb8
FS: 0000000000000000(0000) GS:ffff88817a600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffb48 CR3: 0000000105228006 CR4: 0000000000170ee0
Call Trace:
<TASK>
ieee80211_tx_ba_session_handle_start+0xd0/0x190 [mac80211]
ieee80211_ba_session_work+0xff/0x2e0 [mac80211]
process_one_work+0x29f/0x620
worker_thread+0x4d/0x3d0
? process_one_work+0x620/0x620
kthread+0xfb/0x120
? kthread_complete_and_exit+0x20/0x20
ret_from_fork+0x22/0x30
</TASK>
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
Link: https://lore.kernel.org/r/20221230121850.218810-2-alexander@wetzel-home.de
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:19:56 +01:00
..
2021-09-15 09:50:34 +02:00
2022-12-14 11:31:54 +01:00
2023-01-14 10:16:18 +01:00
2022-07-29 17:19:07 +02:00
2021-04-07 15:00:08 +02:00
2022-10-30 09:41:16 +01:00
2022-06-22 14:13:17 +02:00
2022-05-18 10:23:42 +02:00
2023-01-14 10:15:45 +01:00
2023-01-14 10:15:31 +01:00
2021-07-14 16:56:29 +02:00
2022-12-02 17:39:57 +01:00
2023-01-14 10:16:48 +01:00
2022-12-14 11:31:59 +01:00
2022-05-25 09:17:56 +02:00
2023-01-14 10:16:44 +01:00
2022-03-08 19:09:37 +01:00
2022-12-02 17:40:01 +01:00
2022-08-31 17:15:19 +02:00
2022-12-14 11:32:01 +01:00
2023-01-24 07:19:55 +01:00
2023-01-14 10:15:37 +01:00
2022-11-03 23:57:51 +09:00
2023-01-14 10:16:52 +01:00
2023-01-18 11:44:55 +01:00
2021-03-07 12:34:05 +01:00
2022-11-25 17:45:56 +01:00
2022-12-02 17:39:58 +01:00
2022-11-25 17:45:54 +01:00
2022-04-27 13:53:50 +02:00
2021-02-10 09:29:14 +01:00
2022-03-28 09:57:10 +02:00
2023-01-24 07:19:56 +01:00
2022-12-14 11:32:01 +01:00
2022-09-08 11:11:40 +02:00
2023-01-14 10:16:52 +01:00
2022-01-05 12:40:32 +01:00
2023-01-18 11:44:57 +01:00
2022-04-13 21:01:00 +02:00
2022-08-25 11:38:07 +02:00
2022-01-27 10:54:03 +01:00
2023-01-14 10:16:45 +01:00
2023-01-14 10:16:12 +01:00
2023-01-14 10:16:29 +01:00
2022-01-11 15:25:01 +01:00
2021-03-07 12:34:07 +01:00
2022-08-25 11:38:23 +02:00
2022-10-26 13:25:23 +02:00
2020-11-12 09:18:06 +01:00
2022-11-10 18:14:19 +01:00
2023-01-14 10:16:12 +01:00
2023-01-18 11:44:59 +01:00
2023-01-14 10:15:44 +01:00
2022-09-28 11:10:36 +02:00
2021-11-18 14:04:27 +01:00
2023-01-14 10:16:44 +01:00
2021-02-07 15:37:12 +01:00
2023-01-18 11:44:58 +01:00
2022-08-03 12:00:46 +02:00
2022-12-14 11:32:01 +01:00
2023-01-14 10:15:42 +01:00
2023-01-14 10:15:36 +01:00
2022-11-25 17:45:47 +01:00
2022-10-15 07:55:51 +02:00
2023-01-18 11:44:57 +01:00
2021-06-18 10:00:06 +02:00
2023-01-04 11:39:24 +01:00