From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix IBSS code to not sleep while atomic
Date: Tue, 21 Apr 2009 00:30:49 +0200 [thread overview]
Message-ID: <1240266649.17388.0.camel@johannes.local> (raw)
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>
---
net/mac80211/ibss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/mac80211/ibss.c 2009-04-21 00:28:44.000000000 +0200
+++ wireless-testing/net/mac80211/ibss.c 2009-04-21 00:28:45.000000000 +0200
@@ -784,14 +784,14 @@ void ieee80211_ibss_notify_scan_complete
{
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
reply other threads:[~2009-04-20 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240266649.17388.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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