* [PATCH] cfg80211: add missing device list locking
@ 2009-08-09 9:51 Johannes Berg
2009-08-09 10:18 ` Kalle Valo
2009-08-10 16:21 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2009-08-09 9:51 UTC (permalink / raw)
To: John Linville; +Cc: Kalle Valo, linux-wireless
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>
---
net/wireless/core.c | 2 ++
1 file changed, 2 insertions(+)
--- wireless-testing.orig/net/wireless/core.c 2009-08-09 11:48:16.000000000 +0200
+++ wireless-testing/net/wireless/core.c 2009-08-09 11:48:32.000000000 +0200
@@ -710,6 +710,7 @@ static int cfg80211_netdev_notifier_call
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
break;
}
wdev_unlock(wdev);
+ mutex_unlock(&rdev->devlist_mtx);
cfg80211_unlock_rdev(rdev);
#endif
break;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cfg80211: add missing device list locking
2009-08-09 9:51 [PATCH] cfg80211: add missing device list locking Johannes Berg
@ 2009-08-09 10:18 ` Kalle Valo
2009-08-10 16:21 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2009-08-09 10:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> 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>
Thanks for fixing this. I wasn't able to reproduce the warning after one
suspend/resume cycle, but I'll test this patch a bit more before I send
my Tested-by tag.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cfg80211: add missing device list locking
2009-08-09 9:51 [PATCH] cfg80211: add missing device list locking Johannes Berg
2009-08-09 10:18 ` Kalle Valo
@ 2009-08-10 16:21 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2009-08-10 16:21 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> 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>
I have been testing with patch for a day now and no warnings anymore.
Tested-by: Kalle Valo <kalle.valo@iki.fi>
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-10 16:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-09 9:51 [PATCH] cfg80211: add missing device list locking Johannes Berg
2009-08-09 10:18 ` Kalle Valo
2009-08-10 16:21 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).