Skip to content

Commit

Permalink
mac80211: fix IBSS code to not sleep while atomic
Browse files Browse the repository at this point in the history
With the RCU locking here we sleep while in an atomic context,
since we can sleep just use mutex locking for the interface
list instead of RCU. Sorry, seems I didn't get that in my UML
test.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 22, 2009
1 parent 0cf4c01 commit 29b4a4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,14 +784,14 @@ void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local)
{
struct ieee80211_sub_if_data *sdata;

rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
continue;
sdata->u.ibss.last_scan_completed = jiffies;
ieee80211_sta_find_ibss(sdata);
}
rcu_read_unlock();
mutex_unlock(&local->iflist_mtx);
}

ieee80211_rx_result
Expand Down

0 comments on commit 29b4a4f

Please sign in to comment.