From: Pavel Roskin Date: Thu, 7 Jul 2011 22:14:25 +0000 (-0400) Subject: ath5k: read sc->imask with sc->irqlock held X-Git-Tag: next-20110726~36^2~57 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4fc5401c144d95b031e839ba3208e04c79ac84cb;p=karo-tx-linux.git ath5k: read sc->imask with sc->irqlock held Signed-off-by: Pavel Roskin sc->imask may change if ath5k_set_current_imask() races against itself. Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 58997d3abae6..28113e023c62 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1447,10 +1447,11 @@ ath5k_receive_frame_ok(struct ath5k_softc *sc, struct ath5k_rx_status *rs) static void ath5k_set_current_imask(struct ath5k_softc *sc) { - enum ath5k_int imask = sc->imask; + enum ath5k_int imask; unsigned long flags; spin_lock_irqsave(&sc->irqlock, flags); + imask = sc->imask; if (sc->rx_pending) imask &= ~AR5K_INT_RX_ALL; if (sc->tx_pending)