Patch "mac80211: sta_info: Add lockdep condition for RCU list usage" has been added to the 5.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

    mac80211: sta_info: Add lockdep condition for RCU list usage

to the 5.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:
     mac80211-sta_info-add-lockdep-condition-for-rcu-list.patch
and it can be found in the queue-5.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 a081748d5c3c68f750289d63a623a6a0edca9b01
Author: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
Date:   Thu Apr 9 13:59:06 2020 +0530

    mac80211: sta_info: Add lockdep condition for RCU list usage
    
    [ Upstream commit 8ca47eb9f9e4e10e7e7fa695731a88941732c38d ]
    
    The function sta_info_get_by_idx() uses RCU list primitive.
    It is called with  local->sta_mtx held from mac80211/cfg.c.
    Add lockdep expression to avoid any false positive RCU list warnings.
    
    Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20200409082906.27427-1-madhuparnabhowmik10@xxxxxxxxx
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index e3572be307d6c..149ed0510778d 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -231,7 +231,8 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
 	struct sta_info *sta;
 	int i = 0;
 
-	list_for_each_entry_rcu(sta, &local->sta_list, list) {
+	list_for_each_entry_rcu(sta, &local->sta_list, list,
+				lockdep_is_held(&local->sta_mtx)) {
 		if (sdata != sta->sdata)
 			continue;
 		if (i < idx) {



[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