summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2011-07-07 22:14:25 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2011-07-08 15:47:14 (GMT)
commit4fc5401c144d95b031e839ba3208e04c79ac84cb (patch)
tree51c8c54548969014937fd0714831bf4e7241e007 /drivers
parente2df64c1d767eb52a5c617668e20745d5e3015c8 (diff)
downloadlinux-4fc5401c144d95b031e839ba3208e04c79ac84cb.tar.xz
ath5k: read sc->imask with sc->irqlock held
Signed-off-by: Pavel Roskin <proski@gnu.org> sc->imask may change if ath5k_set_current_imask() races against itself. Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 58997d3..28113e0 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)