Package: broadcom-sta / 6.30.223.248-3

09-fix_system_hang_when_deleting_monitor.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix kernel crash/system hang when disabling monitor interface:
 echo 0 > /proc/brcm_monitor0
 .
 tested on: kernel 3.14
Author: Mickael MASSON <mmasson.dev@gmail.com>
Bug-Debian: https://bugs.debian.org/770327

Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_cfg80211_hybrid.c
===================================================================
--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_cfg80211_hybrid.c	2014-12-07 17:30:25.985535710 +0400
+++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_cfg80211_hybrid.c	2014-12-07 17:30:25.981535710 +0400
@@ -2633,7 +2633,15 @@
 
 void wl_cfg80211_detach(struct net_device *ndev)
 {
-	struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
+	struct wl_cfg80211_priv *wl;
+	struct wireless_dev *wdev;
+	
+	wdev = ndev->ieee80211_ptr;
+	if (wdev == NULL) {
+                printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev);
+                return;
+        }
+	wl = ndev_to_wl(ndev);
 
 	wl_deinit_cfg80211_priv(wl);
 	wl_free_wdev(wl);