Patch "wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update()" has been added to the 6.2-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: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update()

to the 6.2-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-rtw88-use-non-atomic-sta-iterator-in-rtw_ra_mas.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 892e2b7de6e30009d1c04189c0ca6d232b16fafc
Author: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
Date:   Sun Jan 8 22:13:24 2023 +0100

    wifi: rtw88: Use non-atomic sta iterator in rtw_ra_mask_info_update()
    
    [ Upstream commit 2931978cd74f4a643deeea5b211523001d95aa44 ]
    
    USB and (upcoming) SDIO support may sleep in the read/write handlers.
    Use non-atomic rtw_iterate_stas() in rtw_ra_mask_info_update() because
    the iterator function rtw_ra_mask_info_update_iter() needs to read and
    write registers from within rtw_update_sta_info(). Using the non-atomic
    iterator ensures that we can sleep during USB and SDIO register reads
    and writes. This fixes "scheduling while atomic" or "Voluntary context
    switch within RCU read-side critical section!" warnings as seen by SDIO
    card users (but it also affects USB cards).
    
    Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically")
    Suggested-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Tested-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
    Signed-off-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230108211324.442823-4-martin.blumenstingl@xxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index 776a9a9884b5d..3b92ac611d3fd 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -737,7 +737,7 @@ static void rtw_ra_mask_info_update(struct rtw_dev *rtwdev,
 	br_data.rtwdev = rtwdev;
 	br_data.vif = vif;
 	br_data.mask = mask;
-	rtw_iterate_stas_atomic(rtwdev, rtw_ra_mask_info_update_iter, &br_data);
+	rtw_iterate_stas(rtwdev, rtw_ra_mask_info_update_iter, &br_data);
 }
 
 static int rtw_ops_set_bitrate_mask(struct ieee80211_hw *hw,
@@ -746,7 +746,9 @@ static int rtw_ops_set_bitrate_mask(struct ieee80211_hw *hw,
 {
 	struct rtw_dev *rtwdev = hw->priv;
 
+	mutex_lock(&rtwdev->mutex);
 	rtw_ra_mask_info_update(rtwdev, vif, mask);
+	mutex_unlock(&rtwdev->mutex);
 
 	return 0;
 }



[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