net: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete
authorDmitry Shmidt <dimitrysh@google.com>
Tue, 13 Mar 2012 00:33:52 +0000 (17:33 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Wed, 14 Mar 2012 23:36:31 +0000 (16:36 -0700)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index c0b35b7a188cb82200104fba8bc769f5724959f6..c920448e722f43b3e895be67843b4e666b373e69 100644 (file)
@@ -5879,7 +5879,7 @@ static s32 wl_notify_escan_complete(struct wl_priv *wl,
                                ndev, wl_to_prmry_ndev(wl), wl->p2p_net));
                dev = ndev;
        }
-       if (fw_abort) {
+       if (fw_abort && !in_atomic()) {
                /* Our scan params only need space for 1 channel and 0 ssids */
                params = wl_cfg80211_scan_alloc_params(-1, 0, &params_size);
                if (params == NULL) {
@@ -5893,7 +5893,8 @@ static s32 wl_notify_escan_complete(struct wl_priv *wl,
                        }
                }
        }
-       del_timer_sync(&wl->scan_timeout);
+       if (!in_atomic())
+               del_timer_sync(&wl->scan_timeout);
        spin_lock_irqsave(&wl->cfgdrv_lock, flags);
 
 #ifdef WL_SCHED_SCAN