lkml.org 
[lkml]   [2013]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[ 41/89] ath9k: disable the tasklet before taking the PCU lock
Date
3.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Felix Fietkau <nbd@openwrt.org>

commit 4668cce527acb3bd048c5e6c99b157a14b214671 upstream.

Fixes a reported CPU soft lockup where the tasklet tries to acquire the
lock and blocks while ath_prepare_reset (holding the lock) waits for it
to complete.

Reported-by: Robert Shade <robert.shade@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
drivers/net/wireless/ath/ath9k/main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -195,16 +195,12 @@ static bool ath_prepare_reset(struct ath
ath9k_debug_samp_bb_mac(sc);
ath9k_hw_disable_interrupts(ah);

- tasklet_disable(&sc->intr_tq);
-
if (!ath_stoprecv(sc))
ret = false;

if (!ath_drain_all_txq(sc, retry_tx))
ret = false;

- tasklet_enable(&sc->intr_tq);
-
return ret;
}

@@ -261,6 +257,7 @@ static int ath_reset_internal(struct ath

__ath_cancel_work(sc);

+ tasklet_disable(&sc->intr_tq);
spin_lock_bh(&sc->sc_pcu_lock);

if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) {
@@ -291,6 +288,8 @@ static int ath_reset_internal(struct ath

out:
spin_unlock_bh(&sc->sc_pcu_lock);
+ tasklet_enable(&sc->intr_tq);
+
return r;
}




\
 
 \ /
  Last update: 2013-02-01 15:01    [W:1.725 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site