diff options
author | Bruno Randolf <br1@einfach.org> | 2010-06-16 19:11:41 +0900 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-16 14:59:01 -0400 |
commit | 39d63f2a3f95dce96e65f88c0a4560c3ca857a5f (patch) | |
tree | 159fc0b200d9e6734c8109721c0414b6d052d617 /drivers/net/wireless/ath | |
parent | 0452d4a508d7701d37ecf5d018f38e3422acb5d2 (diff) | |
download | blackbird-op-linux-39d63f2a3f95dce96e65f88c0a4560c3ca857a5f.tar.gz blackbird-op-linux-39d63f2a3f95dce96e65f88c0a4560c3ca857a5f.zip |
ath5k: reset more pointers after we free skbs
After we free skbs for receive or transmit descriptors, make sure we have no
pointers to the now invalid memory address.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 6c303d5d46c6..5479f85fcd35 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -322,6 +322,8 @@ static inline void ath5k_txbuf_free_skb(struct ath5k_softc *sc, PCI_DMA_TODEVICE); dev_kfree_skb_any(bf->skb); bf->skb = NULL; + bf->skbaddr = 0; + bf->desc->ds_data = 0; } static inline void ath5k_rxbuf_free_skb(struct ath5k_softc *sc, @@ -337,6 +339,8 @@ static inline void ath5k_rxbuf_free_skb(struct ath5k_softc *sc, PCI_DMA_FROMDEVICE); dev_kfree_skb_any(bf->skb); bf->skb = NULL; + bf->skbaddr = 0; + bf->desc->ds_data = 0; } @@ -1455,9 +1459,12 @@ ath5k_desc_free(struct ath5k_softc *sc, struct pci_dev *pdev) /* Free memory associated with all descriptors */ pci_free_consistent(pdev, sc->desc_len, sc->desc, sc->desc_daddr); + sc->desc = NULL; + sc->desc_daddr = 0; kfree(sc->bufptr); sc->bufptr = NULL; + sc->bbuf = NULL; } |