Skip to content

Commit

Permalink
ath5k: read sc->imask with sc->irqlock held
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Jul 8, 2011
1 parent e2df64c commit 4fc5401
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4fc5401

Please sign in to comment.