linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: add missing device list locking
@ 2009-08-09  9:51 Johannes Berg
  2009-08-09 10:18 ` Kalle Valo
  2009-08-10 16:21 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2009-08-09  9:51 UTC (permalink / raw)
  To: John Linville; +Cc: Kalle Valo, linux-wireless

When calling into the wext code from the NETDEV_UP
notifier, we need to hold the devlist_mtx mutex as
the wext code ends up calling into channel checks.

Reported-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/wireless/core.c |    2 ++
 1 file changed, 2 insertions(+)

--- wireless-testing.orig/net/wireless/core.c	2009-08-09 11:48:16.000000000 +0200
+++ wireless-testing/net/wireless/core.c	2009-08-09 11:48:32.000000000 +0200
@@ -710,6 +710,7 @@ static int cfg80211_netdev_notifier_call
 	case NETDEV_UP:
 #ifdef CONFIG_WIRELESS_EXT
 		cfg80211_lock_rdev(rdev);
+		mutex_lock(&rdev->devlist_mtx);
 		wdev_lock(wdev);
 		switch (wdev->iftype) {
 		case NL80211_IFTYPE_ADHOC:
@@ -722,6 +723,7 @@ static int cfg80211_netdev_notifier_call
 			break;
 		}
 		wdev_unlock(wdev);
+		mutex_unlock(&rdev->devlist_mtx);
 		cfg80211_unlock_rdev(rdev);
 #endif
 		break;



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

end of thread, other threads:[~2009-08-10 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-09  9:51 [PATCH] cfg80211: add missing device list locking Johannes Berg
2009-08-09 10:18 ` Kalle Valo
2009-08-10 16:21 ` Kalle Valo

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).