mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 17:42:03 +02:00
wifi: mac80211: reset the AP_VLAN tailroom counter on ifdown
On ifup, AP_VLAN interfaces get crypto_tx_tailroom_needed_cnt from
the AP interface, but it's never decremented again unless the AP is
also brought down. Thus, bringing the same AP_VLAN up again will
increment the counter again and eventually hit the sanity check:
WARN_ON_ONCE(sdata->crypto_tx_tailroom_needed_cnt !=
master->crypto_tx_tailroom_needed_cnt);
Reset it on ifdown to avoid that.
Assisted-by: LLM
Fixes: f9dca80b98 ("mac80211: fix AP_VLAN crypto tailroom calculation")
Reported-by: syzbot+de3ee5362db09487ea37@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=de3ee5362db09487ea37
Link: https://patch.msgid.link/20260908122838.201719-14-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
e14bf37bb2
commit
4504f3960d
|
|
@ -616,6 +616,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do
|
|||
RCU_INIT_POINTER(sdata->vif.bss_conf.chanctx_conf, NULL);
|
||||
/* see comment in the default case below */
|
||||
ieee80211_free_keys(sdata, true);
|
||||
/* increased by AP value on ifup, so reset on ifdown */
|
||||
sdata->crypto_tx_tailroom_needed_cnt = 0;
|
||||
/* no need to tell driver */
|
||||
break;
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user