OSDN Git Service

rsi: add fix for crash during assertions
authorSanjay Konduri <sanjay.konduri@redpinesignals.com>
Tue, 15 May 2018 09:04:30 +0000 (14:34 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:18:35 +0000 (08:18 +0100)
commit abd39c6ded9db53aa44c2540092bdd5fb6590fa8 upstream.

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>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/rsi/rsi_91x_mac80211.c

index 4df992d..2f40506 100644 (file)
@@ -199,6 +199,7 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
                ieee80211_stop_queues(hw);
                ieee80211_unregister_hw(hw);
                ieee80211_free_hw(hw);
+               adapter->hw = NULL;
        }
 
        rsi_remove_dbgfs(adapter);