Patch "wifi: cfg80211: fix locking in regulatory disconnect" has been added to the 6.1-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: fix locking in regulatory disconnect

to the 6.1-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-fix-locking-in-regulatory-disconnect.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 419fd79aac2c2cc301761cfb9cf178fc20072432
Author: Johannes Berg <johannes.berg@xxxxxxxxx>
Date:   Tue Jun 6 14:34:48 2023 +0200

    wifi: cfg80211: fix locking in regulatory disconnect
    
    [ Upstream commit f7e60032c6618dfd643c7210d5cba2789e2de2e2 ]
    
    This should use wiphy_lock() now instead of requiring the
    RTNL, since __cfg80211_leave() via cfg80211_leave() is now
    requiring that lock to be held.
    
    Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 4f3f31244e8ba..50b16e643f381 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2478,11 +2478,11 @@ static void reg_leave_invalid_chans(struct wiphy *wiphy)
 	struct wireless_dev *wdev;
 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
 
-	ASSERT_RTNL();
-
+	wiphy_lock(wiphy);
 	list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list)
 		if (!reg_wdev_chan_valid(wiphy, wdev))
 			cfg80211_leave(rdev, wdev);
+	wiphy_unlock(wiphy);
 }
 
 static void reg_check_chans_work(struct work_struct *work)



[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