Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1310688 > unrolled thread
| Started by | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| First post | 2016-01-16 01:50 +0100 |
| Last post | 2016-01-16 01:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 4.2.y-ckt 189/305] net: mvpp2: fix missing DMA region unmap in egress processing Kamal Mostafa <kamal@canonical.com> - 2016-01-16 01:50 +0100
| From | Kamal Mostafa <kamal@canonical.com> |
|---|---|
| Date | 2016-01-16 01:50 +0100 |
| Subject | [PATCH 4.2.y-ckt 189/305] net: mvpp2: fix missing DMA region unmap in egress processing |
| Message-ID | <qRne1-5ix-9@gated-at.bofh.it> |
4.2.8-ckt2 -stable review patch. If anyone has any objections, please let me know.
---8<------------------------------------------------------------
From: Marcin Wojtas <mw@semihalf.com>
commit e864b4c7b184bde36fa6a02bb3190983d2f796f9 upstream.
The Tx descriptor release code currently calls dma_unmap_single() and
dev_kfree_skb_any() if the descriptor is associated with a non-NULL skb.
This condition is true only for the last fragment of the packet.
Since every descriptor's buffer is DMA-mapped it has to be properly
unmapped.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375
network unit")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
drivers/net/ethernet/marvell/mvpp2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c
index d9884fd..95db519 100644
--- a/drivers/net/ethernet/marvell/mvpp2.c
+++ b/drivers/net/ethernet/marvell/mvpp2.c
@@ -4401,11 +4401,10 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,
mvpp2_txq_inc_get(txq_pcpu);
- if (!skb)
- continue;
-
dma_unmap_single(port->dev->dev.parent, buf_phys_addr,
skb_headlen(skb), DMA_TO_DEVICE);
+ if (!skb)
+ continue;
dev_kfree_skb_any(skb);
}
}
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web