]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
rsi: add fix for crash during assertions
authorSanjay Konduri <sanjay.konduri@redpinesignals.com>
Tue, 15 May 2018 09:04:30 +0000 (14:34 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 23 May 2018 08:02:21 +0000 (11:02 +0300)
Observed crash in some scenarios when assertion has occurred,
this is because hw structure is freed and is tried to get
accessed in some functions where null check is already
present. So, avoided the crash by making the hw to NULL after
freeing.

Signed-off-by: Sanjay Konduri <sanjay.konduri@redpinesignals.com>
Signed-off-by: Sushant Kumar Mishra <sushant.mishra@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_mac80211.c

index 3faa0449a5ef1f4058c341615f6511827793a933..bfa7569c85bb2d32b03a7e7656825356c58d5180 100644 (file)
@@ -245,6 +245,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
                ieee80211_stop_queues(hw);
                ieee80211_unregister_hw(hw);
                ieee80211_free_hw(hw);
+               adapter->hw = NULL;
        }
 
        for (band = 0; band < NUM_NL80211_BANDS; band++) {