Patch "wifi: mac80211: don't flush non-uploaded STAs" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mac80211: don't flush non-uploaded STAs

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mac80211-don-t-flush-non-uploaded-stas.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1f6c147c921028af7b1fb8fabaec16e70da0f8b3
Author: Johannes Berg <johannes.berg@xxxxxxxxx>
Date:   Thu Jan 2 16:20:06 2025 +0200

    wifi: mac80211: don't flush non-uploaded STAs
    
    [ Upstream commit aa3ce3f8fafa0b8fb062f28024855ea8cb3f3450 ]
    
    If STA state is pre-moved to AUTHORIZED (such as in IBSS
    scenarios) and insertion fails, the station is freed.
    In this case, the driver never knew about the station,
    so trying to flush it is unexpected and may crash.
    
    Check if the sta was uploaded to the driver before and
    fix this.
    
    Fixes: d00800a289c9 ("wifi: mac80211: add flush_sta method")
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Link: https://patch.msgid.link/20250102161730.e3d10970a7c7.I491bbcccc46f835ade07df0640a75f6ed92f20a3@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index d382d9729e853..a06644084d15d 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -724,6 +724,9 @@ static inline void drv_flush_sta(struct ieee80211_local *local,
 	if (sdata && !check_sdata_in_driver(sdata))
 		return;
 
+	if (!sta->uploaded)
+		return;
+
 	trace_drv_flush_sta(local, sdata, &sta->sta);
 	if (local->ops->flush_sta)
 		local->ops->flush_sta(&local->hw, &sdata->vif, &sta->sta);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux