ath9k: Fix a locking related issue.
authorVivek Natarajan <vnatarajan@atheros.com>
Thu, 27 Jan 2011 09:15:10 +0000 (14:45 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Jan 2011 20:44:29 +0000 (15:44 -0500)
Spin_lock has been tried to be acquired twice from ath9k_tasklet
to ath_reset which resulted in a machine freeze.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/xmit.c

index 10a3dbefaa0923b1aa4014c06ed6e5ebb26b30d8..d211aa7f1a3bc4b11d4f2651b8cb7f9c666913a1 100644 (file)
@@ -563,8 +563,11 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 
        rcu_read_unlock();
 
-       if (needreset)
+       if (needreset) {
+               spin_unlock_bh(&sc->sc_pcu_lock);
                ath_reset(sc, false);
+               spin_lock_bh(&sc->sc_pcu_lock);
+       }
 }
 
 static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,