Patch "wifi: cfg80211: free beacon_ies when overridden from hidden BSS" has been added to the 6.6-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: cfg80211: free beacon_ies when overridden from hidden BSS

to the 6.6-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-cfg80211-free-beacon_ies-when-overridden-from-h.patch
and it can be found in the queue-6.6 subdirectory.

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



commit b0a344d193a00bd070a42d55e94f4652bdff0375
Author: Benjamin Berg <benjamin.berg@xxxxxxxxx>
Date:   Wed Dec 20 13:41:41 2023 +0200

    wifi: cfg80211: free beacon_ies when overridden from hidden BSS
    
    [ Upstream commit 32af9a9e1069e55bc02741fb00ac9d0ca1a2eaef ]
    
    This is a more of a cosmetic fix. The branch will only be taken if
    proberesp_ies is set, which implies that beacon_ies is not set unless we
    are connected to an AP that just did a channel switch. And, in that case
    we should have found the BSS in the internal storage to begin with.
    
    Signed-off-by: Benjamin Berg <benjamin.berg@xxxxxxxxx>
    Reviewed-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx>
    Link: https://msgid.link/20231220133549.b898e22dadff.Id8c4c10aedd176ef2e18a4cad747b299f150f9df@changeid
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index bd4dd75e446e..04ef7cdd39b5 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1829,8 +1829,12 @@ __cfg80211_bss_update(struct cfg80211_registered_device *rdev,
 				list_add(&new->hidden_list,
 					 &hidden->hidden_list);
 				hidden->refcount++;
+
+				ies = (void *)rcu_dereference(new->pub.beacon_ies);
 				rcu_assign_pointer(new->pub.beacon_ies,
 						   hidden->pub.beacon_ies);
+				if (ies)
+					kfree_rcu(ies, rcu_head);
 			}
 		} else {
 			/*




[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