Skip to content

Commit 4fc5401

Browse files
Pavel Roskinlinvjw
authored andcommitted
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>
1 parent e2df64c commit 4fc5401

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/wireless/ath/ath5k

‎drivers/net/wireless/ath/ath5k/base.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,10 +1447,11 @@ ath5k_receive_frame_ok(struct ath5k_softc *sc, struct ath5k_rx_status *rs)
14471447
static void
14481448
ath5k_set_current_imask(struct ath5k_softc *sc)
14491449
{
1450-
enum ath5k_int imask = sc->imask;
1450+
enum ath5k_int imask;
14511451
unsigned long flags;
14521452

14531453
spin_lock_irqsave(&sc->irqlock, flags);
1454+
imask = sc->imask;
14541455
if (sc->rx_pending)
14551456
imask &= ~AR5K_INT_RX_ALL;
14561457
if (sc->tx_pending)

0 commit comments

Comments
 (0)