Skip to contentSkip to conversation

cfg80211: fix wiphy remove if no regulatory request

PATCH In review Johannes Berg 2 participants 3 messages Dec 1, 2008 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: fix wiphy remove if no regulatory request

Fixes the segfault I just pointed out.

---
 net/wireless/reg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/reg.c +1 -1
@@ -1330,7 +1330,7 @@ int set_regdom(const struct ieee80211_re
 /* Caller must hold cfg80211_drv_mutex */
 void reg_device_remove(struct wiphy *wiphy)
 {
-	if (!last_request->wiphy)
+	if (!last_request || !last_request->wiphy)
 		return;
 	if (last_request->wiphy != wiphy)
 		return;
#1 lore raw
Quoted 1 line · Johannes Berg

Fixes the segfault I just pointed out.

Thanks, the commit log should include the panic I guess though right?

Luis

author maintainer
#2 lore raw
Quoted 4 lines · Luis R. Rodriguez
Quoted 1 line · Johannes Berg

Fixes the segfault I just pointed out.

Thanks, the commit log should include the panic I guess though right?

Maybe, maybe not, it's fairly clear what's going on from the diff, I think.

johannes