]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: do not wake queues on a vif that is being stopped
authorFelix Fietkau <nbd@nbd.name>
Tue, 31 May 2022 19:08:24 +0000 (21:08 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 Jun 2022 09:43:15 +0000 (11:43 +0200)
commitd6ce4edfa869a6a68d5e2142c2ab45294dbf3098
tree4ab015f338e797aad4e81c7796ef20a40736f482
parent83784d230e7cc7fc5e06f16dcd08f4b13b606e0e
wifi: mac80211: do not wake queues on a vif that is being stopped

When a vif is being removed and sdata->bss is cleared, __ieee80211_wake_txqs
can still be called on it, which crashes as soon as sdata->bss is being
dereferenced.
To fix this properly, check for SDATA_STATE_RUNNING before waking queues,
and take the fq lock when setting it (to ensure that __ieee80211_wake_txqs
observes the change when running on a different CPU)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Acked-by: Toke Høiland-Jørgensen <toke@kernel.org>
Link: https://lore.kernel.org/r/20220531190824.60019-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c
net/mac80211/util.c