summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-08-09 11:51:29 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:54 -0400
commitaee83eaff859694642b323553f93b9eb59141144 (patch)
treecba03d4b09fa82b8da3958080f3e7b7e1e4cb43a /net/wireless
parentaf6a3fc7e728eb4cd14653c8cfc1ee81432cfd5d (diff)
downloadkernel-mfld-blackbay-aee83eaff859694642b323553f93b9eb59141144.tar.gz
kernel-mfld-blackbay-aee83eaff859694642b323553f93b9eb59141144.tar.bz2
kernel-mfld-blackbay-aee83eaff859694642b323553f93b9eb59141144.zip
cfg80211: add missing device list locking
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> Tested-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 62e1ac00879..e630648fef7 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -710,6 +710,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
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(struct notifier_block * nb,
break;
}
wdev_unlock(wdev);
+ mutex_unlock(&rdev->devlist_mtx);
cfg80211_unlock_rdev(rdev);
#endif
break;