* [Linux-kernel-mentees] [PATCH 2/4] net: mac80211: scan.c: Fix RCU list related warnings.
@ 2020-04-09 8:28 madhuparnabhowmik10
2020-04-24 9:21 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: madhuparnabhowmik10 @ 2020-04-09 8:28 UTC (permalink / raw)
To: johannes, davem, kuba
Cc: paulmck, netdev, linux-wireless, linux-kernel,
Madhuparna Bhowmik, joel, linux-kernel-mentees
From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
This patch fixes the following warning:
WARNING: suspicious RCU usage
[ 84.530619] 5.6.0+ #4 Not tainted
[ 84.530637] -----------------------------
[ 84.530658] net/mac80211/scan.c:454 RCU-list traversed in non-reader section!!
As local->mtx is held in __ieee80211_scan_completed(), no need to use
list_for_each_entry_rcu() (use list_for_each_entry() instead.).
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
net/mac80211/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index fdac8192a519..0860f028ab2a 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -451,7 +451,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
* the scan was in progress; if there was none this will
* just be a no-op for the particular interface.
*/
- list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+ list_for_each_entry(sdata, &local->interfaces, list) {
if (ieee80211_sdata_running(sdata))
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
}
--
2.17.1
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH 2/4] net: mac80211: scan.c: Fix RCU list related warnings.
2020-04-09 8:28 [Linux-kernel-mentees] [PATCH 2/4] net: mac80211: scan.c: Fix RCU list related warnings madhuparnabhowmik10
@ 2020-04-24 9:21 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2020-04-24 9:21 UTC (permalink / raw)
To: madhuparnabhowmik10, davem, kuba
Cc: paulmck, netdev, linux-wireless, linux-kernel, joel,
linux-kernel-mentees
On Thu, 2020-04-09 at 13:58 +0530, madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
>
> This patch fixes the following warning:
>
> WARNING: suspicious RCU usage
> [ 84.530619] 5.6.0+ #4 Not tainted
> [ 84.530637] -----------------------------
> [ 84.530658] net/mac80211/scan.c:454 RCU-list traversed in non-reader section!!
>
> As local->mtx is held in __ieee80211_scan_completed()
Yeah, but is that really the right lock? I think it should be RTNL or
iflist_mtx for the interface list.
(Not that this is necessarily a good idea - we perhaps should clean up
and significantly reduce the number of locks used here.)
johannes
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-24 9:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 8:28 [Linux-kernel-mentees] [PATCH 2/4] net: mac80211: scan.c: Fix RCU list related warnings madhuparnabhowmik10
2020-04-24 9:21 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).