aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-11-11 05:28:04 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-11-12 16:49:53 -0500
commitdb7fb86b0ca565cf3537401612581a8158025cc2 (patch)
tree67da233b8a1958328eb73d39ceecf6fc11c8b30a /net
parent8f7c41d4cec91cdbfa89b4a77d5a628938875366 (diff)
mac80211: fix notify_mac function
The ieee80211_notify_mac() function uses ieee80211_sta_req_auth() which in turn calls ieee80211_set_disassoc() which calls a few functions that need to be able to sleep, so ieee80211_notify_mac() cannot use RCU locking for the interface list and must use rtnl locking instead. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 87665d7bb4f9..14d165f0df75 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2570,14 +2570,14 @@ void ieee80211_notify_mac(struct ieee80211_hw *hw,
2570 2570
2571 switch (notif_type) { 2571 switch (notif_type) {
2572 case IEEE80211_NOTIFY_RE_ASSOC: 2572 case IEEE80211_NOTIFY_RE_ASSOC:
2573 rcu_read_lock(); 2573 rtnl_lock();
2574 list_for_each_entry_rcu(sdata, &local->interfaces, list) { 2574 list_for_each_entry(sdata, &local->interfaces, list) {
2575 if (sdata->vif.type != NL80211_IFTYPE_STATION) 2575 if (sdata->vif.type != NL80211_IFTYPE_STATION)
2576 continue; 2576 continue;
2577 2577
2578 ieee80211_sta_req_auth(sdata, &sdata->u.sta); 2578 ieee80211_sta_req_auth(sdata, &sdata->u.sta);
2579 } 2579 }
2580 rcu_read_unlock(); 2580 rtnl_unlock();
2581 break; 2581 break;
2582 } 2582 }
2583} 2583}