ath6kl: Fix race in heart beat polling
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Thu, 20 Jun 2013 07:17:20 +0000 (12:47 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 7 Aug 2013 07:53:36 +0000 (10:53 +0300)
Make sure to cancel heart beat timer before
freeing wmi to avoid potential NULL pointer
dereference.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/init.c

index 6a67881f94d60b2ff9880c0e8280cfbf4ca7edb1..4f316bdcbab58da3911c6a2365da1989ba412744 100644 (file)
@@ -1836,6 +1836,9 @@ void ath6kl_stop_txrx(struct ath6kl *ar)
 
        clear_bit(WMI_READY, &ar->flag);
 
+       if (ar->fw_recovery.enable)
+               del_timer_sync(&ar->fw_recovery.hb_timer);
+
        /*
         * After wmi_shudown all WMI events will be dropped. We
         * need to cleanup the buffers allocated in AP mode and