diff options
author | Pavel Roskin <proski@gnu.org> | 2009-04-03 20:10:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-16 10:39:07 -0400 |
commit | 853da11b94e674445e93660f47a5f0aeeea09623 (patch) | |
tree | f8ef7a90da0a04fb81feca8f447baf6bf47a3c3d /drivers/net/wireless | |
parent | c6dbe17f193c4adc8afc6884f26efb5fa27aa8af (diff) |
ath9k: fix access to a freed skb in ath_rx_tasklet()
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath9k/recv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c index 71cb18d6757d..dd1f30156740 100644 --- a/drivers/net/wireless/ath9k/recv.c +++ b/drivers/net/wireless/ath9k/recv.c | |||
@@ -493,6 +493,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
493 | int hdrlen, padsize, retval; | 493 | int hdrlen, padsize, retval; |
494 | bool decrypt_error = false; | 494 | bool decrypt_error = false; |
495 | u8 keyix; | 495 | u8 keyix; |
496 | __le16 fc; | ||
496 | 497 | ||
497 | spin_lock_bh(&sc->rx.rxbuflock); | 498 | spin_lock_bh(&sc->rx.rxbuflock); |
498 | 499 | ||
@@ -606,6 +607,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
606 | /* see if any padding is done by the hw and remove it */ | 607 | /* see if any padding is done by the hw and remove it */ |
607 | hdr = (struct ieee80211_hdr *)skb->data; | 608 | hdr = (struct ieee80211_hdr *)skb->data; |
608 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); | 609 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); |
610 | fc = hdr->frame_control; | ||
609 | 611 | ||
610 | /* The MAC header is padded to have 32-bit boundary if the | 612 | /* The MAC header is padded to have 32-bit boundary if the |
611 | * packet payload is non-zero. The general calculation for | 613 | * packet payload is non-zero. The general calculation for |
@@ -690,7 +692,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
690 | sc->rx.rxotherant = 0; | 692 | sc->rx.rxotherant = 0; |
691 | } | 693 | } |
692 | 694 | ||
693 | if (ieee80211_is_beacon(hdr->frame_control) && | 695 | if (ieee80211_is_beacon(fc) && |
694 | (sc->sc_flags & SC_OP_WAIT_FOR_BEACON)) { | 696 | (sc->sc_flags & SC_OP_WAIT_FOR_BEACON)) { |
695 | sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON; | 697 | sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON; |
696 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); | 698 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); |