* [PATCH] nl80211: Avoid AP mode BUG_ON hang with invalid lock assert
@ 2009-02-24 14:49 Jouni Malinen
0 siblings, 0 replies; only message in thread
From: Jouni Malinen @ 2009-02-24 14:49 UTC (permalink / raw)
To: John W. Linville, Johannes Berg; +Cc: linux-wireless
2b1d3f8fbd188d84713d25e9d1c3126e3852a1b3 added assert_cfg80211_lock()
calls into various places. At least one of them, nl80211_send_wiphy(),
should not have been there. That triggers the BUG_ON in
assert_cfg80211_lock() and pretty much kills the kernel whenever
someone runs hostapd.. Remove that call and make assert_cfg80211_lock()
use WARN_ON instead of BUG_ON to be a bit more friendly to users.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/core.h | 2 +-
net/wireless/nl80211.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
--- wireless-testing.orig/net/wireless/core.h 2009-02-24 16:32:53.000000000 +0200
+++ wireless-testing/net/wireless/core.h 2009-02-24 16:33:18.000000000 +0200
@@ -76,7 +76,7 @@ extern struct list_head cfg80211_drv_lis
static inline void assert_cfg80211_lock(void)
{
- BUG_ON(!mutex_is_locked(&cfg80211_mutex));
+ WARN_ON(!mutex_is_locked(&cfg80211_mutex));
}
/*
--- wireless-testing.orig/net/wireless/nl80211.c 2009-02-24 16:33:57.000000000 +0200
+++ wireless-testing/net/wireless/nl80211.c 2009-02-24 16:34:28.000000000 +0200
@@ -158,8 +158,6 @@ static int nl80211_send_wiphy(struct sk_
int i;
u16 ifmodes = dev->wiphy.interface_modes;
- assert_cfg80211_lock();
-
hdr = nl80211hdr_put(msg, pid, seq, flags, NL80211_CMD_NEW_WIPHY);
if (!hdr)
return -1;
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-24 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24 14:49 [PATCH] nl80211: Avoid AP mode BUG_ON hang with invalid lock assert Jouni Malinen
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).