Skip to content

Commit 321028b

Browse files
committed
wifi: mac80211: disable softirqs for queued frame handling
As noticed by syzbot, calling ieee80211_handle_queued_frames() (and actually handling frames there) requires softirqs to be disabled, since we call into the RX code. Fix that in the case of cleaning up frames left over during shutdown. Fixes: 177c6ae ("wifi: mac80211: handle tasklet frames before stopping") Reported-by: [email protected] Link: https://patch.msgid.link/20240626091559.cd6f08105a6e.I74778610a5ff2cf8680964698131099d2960352a@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent d1cba2e commit 321028b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

net/mac80211/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ u64 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata)
423423
BSS_CHANGED_ERP_SLOT;
424424
}
425425

426+
/* context: requires softirqs disabled */
426427
void ieee80211_handle_queued_frames(struct ieee80211_local *local)
427428
{
428429
struct sk_buff *skb;

net/mac80211/util.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,9 @@ u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
15671567

15681568
void ieee80211_stop_device(struct ieee80211_local *local)
15691569
{
1570+
local_bh_disable();
15701571
ieee80211_handle_queued_frames(local);
1572+
local_bh_enable();
15711573

15721574
ieee80211_led_radio(local, false);
15731575
ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO);

0 commit comments

Comments
 (0)