From f50e4a8494a74bdbc0f86f1430a4cca2a4f28799 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 12 Mar 2008 16:13:31 -0400 Subject: [PATCH] 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. Signed-off-by: Pavel Roskin Acked-by: Nick Kossifidis Signed-off-by: John W. Linville --- drivers/net/wireless/ath5k/hw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index c2de2d958e8..01757436353 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c @@ -427,6 +427,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); -- 2.41.1