Search Linux Wireless

[PATCH] mac80211: BUG_ON unregistering unregistered device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds a BUG_ON when you unregister a device that wasn't registered.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

---
Applies on top of Michael's tasklet fixes or something. Maybe applies
anyway, fuzz should be minimal in any case.

--- wireless-dev.orig/net/mac80211/ieee80211.c	2007-03-23 21:07:00.354239808 +0100
+++ wireless-dev/net/mac80211/ieee80211.c	2007-03-23 21:07:33.184239808 +0100
@@ -4729,6 +4729,8 @@ void ieee80211_unregister_hw(struct ieee
 	struct ieee80211_sub_if_data *sdata, *tmp;
 	int i;
 
+	BUG_ON(local->reg_state != IEEE80211_DEV_REGISTERED);
+
 	tasklet_disable(&local->tasklet);
 	/* TODO: skb_queue should be empty here, no need to do anything? */
 


-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux