Skip to content

Commit

Permalink
ath9k: fix dma mapping leak of rx buffer upon rmmod
Browse files Browse the repository at this point in the history
We were claiming DMA buffers on the RX tasklet but never
upon a simple module removal.

Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Mar 28, 2009
1 parent 14344b8 commit 051b919
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/wireless/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,13 @@ void ath_rx_cleanup(struct ath_softc *sc)

list_for_each_entry(bf, &sc->rx.rxbuf, list) {
skb = bf->bf_mpdu;
if (skb)
if (skb) {
dma_unmap_single(sc->dev,
bf->bf_buf_addr,
sc->rx.bufsize,
DMA_FROM_DEVICE);
dev_kfree_skb(skb);
}
}

if (sc->rx.rxdma.dd_desc_len != 0)
Expand Down

0 comments on commit 051b919

Please sign in to comment.