Commit ac04ab96 authored by Mintz, Yuval's avatar Mintz, Yuval Committed by Greg Kroah-Hartman

qed: Fix mapping leak on LL2 rx flow


[ Upstream commit 752ecb2d ]

When receiving an Rx LL2 packet, qed fails to unmap the previous buffer.

Fixes: 0a7fb11c ("qed: Add Light L2 support");
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8de6d7b2
...@@ -187,6 +187,8 @@ static void qed_ll2b_complete_rx_packet(struct qed_hwfn *p_hwfn, ...@@ -187,6 +187,8 @@ static void qed_ll2b_complete_rx_packet(struct qed_hwfn *p_hwfn,
/* If need to reuse or there's no replacement buffer, repost this */ /* If need to reuse or there's no replacement buffer, repost this */
if (rc) if (rc)
goto out_post; goto out_post;
dma_unmap_single(&cdev->pdev->dev, buffer->phys_addr,
cdev->ll2->rx_size, DMA_FROM_DEVICE);
skb = build_skb(buffer->data, 0); skb = build_skb(buffer->data, 0);
if (!skb) { if (!skb) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment