]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mac80211: always wind down STA state
authorJohannes Berg <johannes.berg@intel.com>
Fri, 9 Oct 2020 12:17:11 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Nov 2020 09:15:32 +0000 (10:15 +0100)
commit03d5c11b7b4a07220275528335001b9b8be839b0
treeebe88e41f3df7849c856be4e928ce040a4fae741
parent88d9fe1e1487a5a084c12d4e92ec40b908553ce2
mac80211: always wind down STA state

commit dcd479e10a0510522a5d88b29b8f79ea3467d501 upstream.

When (for example) an IBSS station is pre-moved to AUTHORIZED
before it's inserted, and then the insertion fails, we don't
clean up the fast RX/TX states that might already have been
created, since we don't go through all the state transitions
again on the way down.

Do that, if it hasn't been done already, when the station is
freed. I considered only freeing the fast TX/RX state there,
but we might add more state so it's more robust to wind down
the state properly.

Note that we warn if the station was ever inserted, it should
have been properly cleaned up in that case, and the driver
will probably not like things happening out of order.

Reported-by: syzbot+2e293dbd67de2836ba42@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20201009141710.7223b322a955.I95bd08b9ad0e039c034927cce0b75beea38e059b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/sta_info.c