Skip to contentSkip to conversation

ath9k: Fix potential use-after-free.

PATCH New greearb at candelatech.com 2 participants 2 messages Oct 13, 2010 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Fix potential use-after-free.

From: Ben Greear <[email protected]>

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.

---
:100644 100644 942be55... 6d41d47... M drivers/net/wireless/ath/ath9k/xmit.c

 drivers/net/wireless/ath/ath9k/xmit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
index 942be55..6d41d47 100644
@@ -1926,8 +1926,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);
 	}
 
 	/*
Signature · 1 line
1.7.2.2