archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <>
To: John Linville <>
Cc: Kalle Valo <>,
	linux-wireless <>
Subject: [PATCH] cfg80211: add missing device list locking
Date: Sun, 09 Aug 2009 11:51:29 +0200	[thread overview]
Message-ID: <1249811489.4636.2.camel@johannes.local> (raw)

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 <>
Signed-off-by: Johannes Berg <>
 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:
+		mutex_lock(&rdev->devlist_mtx);
 		switch (wdev->iftype) {
 		case NL80211_IFTYPE_ADHOC:
@@ -722,6 +723,7 @@ static int cfg80211_netdev_notifier_call
+		mutex_unlock(&rdev->devlist_mtx);

             reply	other threads:[~2009-08-09  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09  9:51 Johannes Berg [this message]
2009-08-09 10:18 ` [PATCH] cfg80211: add missing device list locking Kalle Valo
2009-08-10 16:21 ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1249811489.4636.2.camel@johannes.local \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).