]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix race condition on enabling fast-xmit
authorFelix Fietkau <nbd@nbd.name>
Thu, 4 Jan 2024 18:10:59 +0000 (19:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:34:48 +0000 (13:34 +0100)
commit54b79d8786964e2f840e8a2ec4a9f9a50f3d4954
tree5570427d9006bad2ee38e0ead68420f94cb8c201
parent29df20cae2ce9a791885bc61f760560006d2be87
wifi: mac80211: fix race condition on enabling fast-xmit

[ Upstream commit bcbc84af1183c8cf3d1ca9b78540c2185cd85e7f ]

fast-xmit must only be enabled after the sta has been uploaded to the driver,
otherwise it could end up passing the not-yet-uploaded sta via drv_tx calls
to the driver, leading to potential crashes because of uninitialized drv_priv
data.
Add a missing sta->uploaded check and re-check fast xmit after inserting a sta.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://msgid.link/20240104181059.84032-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/sta_info.c
net/mac80211/tx.c