From: Dmitry Shmidt Date: Tue, 13 Mar 2012 00:33:52 +0000 (-0700) Subject: net: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete X-Git-Tag: firefly_0821_release~7613^2~163 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1aa5b7f6a05b807c741e9e082e8deac02850693f;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Fix crash on timeout in wl_notify_escan_complete Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index c0b35b7a188c..c920448e722f 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -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, ¶ms_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