diff mbox

[1/2] rsi: add fix for crash during assertions

Message ID 1526375071-7010-1-git-send-email-sushant2k1513@gmail.com (mailing list archive)
State Accepted
Commit abd39c6ded9db53aa44c2540092bdd5fb6590fa8
Delegated to: Kalle Valo
Headers show

Commit Message

Sushant Kumar Mishra May 15, 2018, 9:04 a.m. UTC
From: Sanjay Konduri <sanjay.konduri@redpinesignals.com>

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>
---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo May 23, 2018, 8:02 a.m. UTC | #1
Sushant Kumar Mishra <sushant2k1513@gmail.com> wrote:

> From: Sanjay Konduri <sanjay.konduri@redpinesignals.com>
> 
> 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>

2 patches applied to wireless-drivers-next.git, thanks.

abd39c6ded9d rsi: add fix for crash during assertions
eeed833aaa38 rsi: add fix for corruption of auto rate table
diff mbox

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 3faa044..bfa7569 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -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++) {