]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 6 Mar 2025 10:37:55 +0000 (12:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:30 +0000 (14:39 +0200)
commit9465e09b74ebab124e21790e3a4d37cc5d8dbe0c
tree22bb25f52d971026bb1c744983ae9ae5ac65a307
parent56e6d4a8877ff6701d83e75f194f016ef8574308
wifi: mac80211: flush the station before moving it to UN-AUTHORIZED state

[ Upstream commit 43e04077170799d0e6289f3e928f727e401b3d79 ]

We first want to flush the station to make sure we no longer have any
frames being Tx by the station before the station is moved to
un-authorized state. Failing to do that will lead to races: a frame may
be sent after the station's state has been changed.

Since the API clearly states that the driver can't fail the sta_state()
transition down the list of state, we can easily flush the station
first, and only then call the driver's sta_state().

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250306123626.450bc40e8b04.I636ba96843c77f13309c15c9fd6eb0c5a52a7976@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/sta_info.c