提交 a8c9bd3b 编写于 作者: E Esben Haabendal 提交者: David S. Miller

net: ll_temac: Fix iommu/swiotlb leak

Unmap the actual buffer length, not the amount of data received, avoiding
resource exhaustion of swiotlb (seen on x86_64 platform).
Signed-off-by: NEsben Haabendal <esben@geanix.com>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f14f5c11
......@@ -820,7 +820,7 @@ static void ll_temac_recv(struct net_device *ndev)
length = be32_to_cpu(cur_p->app4) & 0x3FFF;
dma_unmap_single(ndev->dev.parent, be32_to_cpu(cur_p->phys),
length, DMA_FROM_DEVICE);
XTE_MAX_JUMBO_FRAME_SIZE, DMA_FROM_DEVICE);
skb_put(skb, length);
skb->protocol = eth_type_trans(skb, ndev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册