projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90079ce
)
tg3: Fix DMA mapping leak in tigon3_dma_hwbug_workaround().
author
David S. Miller
<davem@davemloft.net>
Thu, 11 Sep 2008 22:45:19 +0000
(15:45 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 11 Sep 2008 22:45:19 +0000
(15:45 -0700)
Noticed by Michael Chan.
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/tg3.c
b/drivers/net/tg3.c
index 355e8bcf6fed262cc76be313ab6b9f31c61bf443..123920759efde3a0ce991fa670ee0c0ab47b68ca 100644
(file)
--- a/
drivers/net/tg3.c
+++ b/
drivers/net/tg3.c
@@
-4631,6
+4631,9
@@
static int tigon3_dma_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
* Drop the packet if it does.
*/
if (ret || tg3_4g_overflow_test(new_addr, new_skb->len)) {
+ if (!ret)
+ skb_dma_unmap(&tp->pdev->dev, new_skb,
+ DMA_TO_DEVICE);
ret = -1;
dev_kfree_skb(new_skb);
new_skb = NULL;