linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4/4] net: mac80211: mlme.c: Add lockdep condition for RCU list usage
@ 2020-04-09  8:29 madhuparnabhowmik10
  2020-04-24  9:24 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: madhuparnabhowmik10 @ 2020-04-09  8:29 UTC (permalink / raw)
  To: johannes, davem, kuba
  Cc: linux-wireless, netdev, linux-kernel, frextrite, joel, paulmck,
	linux-kernel-mentees, Madhuparna Bhowmik

From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>

ieee80211_add_vht_ie() is called with sdata->wdev.mtx held from
ieee80211_send_assoc(). Add lockdep condition to avoid false positive
warnings.

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
 net/mac80211/mlme.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 16d75da0996a..ef64b3e91ce6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -590,7 +590,8 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
 		bool disable_mu_mimo = false;
 		struct ieee80211_sub_if_data *other;
 
-		list_for_each_entry_rcu(other, &local->interfaces, list) {
+		list_for_each_entry_rcu(other, &local->interfaces, list,
+					lockdep_is_held(&sdata->wdev.mtx)) {
 			if (other->vif.mu_mimo_owner) {
 				disable_mu_mimo = true;
 				break;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/4] net: mac80211: mlme.c: Add lockdep condition for RCU list usage
  2020-04-09  8:29 [PATCH 4/4] net: mac80211: mlme.c: Add lockdep condition for RCU list usage madhuparnabhowmik10
@ 2020-04-24  9:24 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2020-04-24  9:24 UTC (permalink / raw)
  To: madhuparnabhowmik10, davem, kuba
  Cc: linux-wireless, netdev, linux-kernel, frextrite, joel, paulmck,
	linux-kernel-mentees

On Thu, 2020-04-09 at 13:59 +0530, madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> ieee80211_add_vht_ie() is called with sdata->wdev.mtx held from
> ieee80211_send_assoc(). Add lockdep condition to avoid false positive
> warnings.

Again, wrong lock!

Over the course of the three patches, you've now claimed that any one of

 * RTNL,
 * local->iflist_mtx,
 * local->mtx, and
 * sdata->wdev.mtx

are sufficient to iterate the interface list, but only the first two are
really true.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-24  9:24 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:29 [PATCH 4/4] net: mac80211: mlme.c: Add lockdep condition for RCU list usage madhuparnabhowmik10
2020-04-24  9:24 ` 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).