ath5k: disable irq handling in ath5k_hw_detach()
PATCH 1/1 ath5k: disable irq handling in ath5k_hw_detach()
Once ah has been freed, it may not be accessed. Set ATH_STAT_INVALID bit to make the interrupt handler return IRQ_NONE without accessing ah.
This fixes oops on unload with CONFIG_DEBUG_SHIRQ enabled.
---
drivers/net/wireless/ath5k/hw.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/ath5k/hw.c +2 -0
@@ -458,6 +458,8 @@ void ath5k_hw_detach(struct ath5k_hw *ah) {ATH5K_TRACE (ah->ah_sc); +__set_bit (ATH_STAT_INVALID , ah->ah_sc->status); +if (ah->ah_rf_banks !=NULL )kfree (ah->ah_rf_banks);
Signature · 2 lines
Regards, Pavel Roskin
2008/3/12, Pavel Roskin <[email protected]>:
Quoted 22 lines
Once ah has been freed, it may not be accessed. Set
ATH_STAT_INVALID
bit to make the interrupt handler returnIRQ_NONEwithout accessing ah.This fixes oops on unload with
CONFIG_DEBUG_SHIRQenabled.Signed-off-by Pavel Roskin <[email protected]>---
drivers/net/wireless/ath5k/hw.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)diff --git
a/drivers/net/wireless/ath5k/hw.cb/drivers/net/wireless/ath5k/hw.cindex 677600b..ff579a2 100644
---a/drivers/net/wireless/ath5k/hw.c
+++b/drivers/net/wireless/ath5k/hw.c
@@ -458,6 +458,8 @@ voidath5k_hw_detach(struct ath5k_hw *ah){ ATH5K_TRACE(ah->ah_sc);+
__set_bit(ATH_STAT_INVALID, ah->ah_sc->status);
+
Quoted 8 lines
if (ah->ah_rf_banks != NULL) kfree(ah->ah_rf_banks);--
Regards,
Pavel Roskin
Signature · 3 lines
GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick