Skip to content

Commit

Permalink
mac80211: fix notify_mac function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
jmberg authored and linvjw committed Nov 12, 2008
1 parent 8f7c41d commit db7fb86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,14 +2570,14 @@ void ieee80211_notify_mac(struct ieee80211_hw *hw,

switch (notif_type) {
case IEEE80211_NOTIFY_RE_ASSOC:
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
rtnl_lock();
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_STATION)
continue;

ieee80211_sta_req_auth(sdata, &sdata->u.sta);
}
rcu_read_unlock();
rtnl_unlock();
break;
}
}
Expand Down

0 comments on commit db7fb86

Please sign in to comment.