[3.5.y.z,extended,stable] Patch "ath9k: disable the tasklet before taking the PCU lock" has been added to staging queue

Message ID 1359670191-16437-1-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Jan. 31, 2013, 10:09 p.m.
This is a note to let you know that I have just added a patch titled

    ath9k: disable the tasklet before taking the PCU lock

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From a375ee819a250ec1c86e6dd64281f45e06868dbd Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Mon, 14 Jan 2013 16:56:46 +0100
Subject: [PATCH] ath9k: disable the tasklet before taking the PCU lock

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>
[ herton: adjust context ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
 drivers/net/wireless/ath/ath9k/main.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)



diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e5c9575..68dd853 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -250,16 +250,12 @@  static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx)

-	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;

@@ -321,6 +317,7 @@  static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan,


+	tasklet_disable(&sc->intr_tq);

 	if (!(sc->sc_flags & SC_OP_OFFCHANNEL)) {
@@ -351,6 +348,8 @@  static int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan,

+	tasklet_enable(&sc->intr_tq);
 	return r;