Browse Source

ath9k: Fix potential use-after-free.

The ath_debug_stat_tx references bf->bf_mpdu, which
is the skb consumed by 	ath_tx_complete.  So, call
the ath_debug_stat_tx method first.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear 14 years ago
parent
commit
c23cc81a5e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/wireless/ath/ath9k/xmit.c

+ 1 - 1
drivers/net/wireless/ath/ath9k/xmit.c

@@ -1924,8 +1924,8 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
 		else
 			complete(&sc->paprd_complete);
 	} else {
-		ath_tx_complete(sc, skb, bf->aphy, tx_flags);
 		ath_debug_stat_tx(sc, txq, bf, ts);
+		ath_tx_complete(sc, skb, bf->aphy, tx_flags);
 	}
 
 	/*