All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <netdev@vger.kernel.org>
Cc: Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH net 3/7] qed: Fix mapping leak on LL2 rx flow
Date: Tue, 14 Mar 2017 15:26:00 +0200	[thread overview]
Message-ID: <1489497964-13734-4-git-send-email-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <1489497964-13734-1-git-send-email-Yuval.Mintz@cavium.com>

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

Fixes: 0a7fb11c23c0 ("qed: Add Light L2 support");
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index 5fb34db..29ae5ec 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -211,6 +211,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 (rc)
 		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);
 	if (!skb) {
-- 
1.9.3

  parent reply	other threads:[~2017-03-14 13:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 13:25 [PATCH net 0/7] qed: Fixes series Yuval Mintz
2017-03-14 13:25 ` [PATCH net 1/7] qed: Align CIDs according to DORQ requirement Yuval Mintz
2017-03-14 13:25 ` [PATCH net 2/7] qed: Prevent creation of too-big u32-chains Yuval Mintz
2017-03-14 13:26 ` Yuval Mintz [this message]
2017-03-14 13:26 ` [PATCH net 4/7] qed: Free previous connections when releasing iSCSI Yuval Mintz
2017-03-14 13:26 ` [PATCH net 5/7] qed: Fix interrupt flags on Rx LL2 Yuval Mintz
2017-03-14 13:26 ` [PATCH net 6/7] qed: Correct out-of-bound access in OOO history Yuval Mintz
2017-03-14 13:26 ` [PATCH net 7/7] qed: Enable iSCSI Out-of-Order Yuval Mintz
2017-03-14 13:29 ` FW: [PATCH net 0/7] qed: Fixes series Mintz, Yuval
2017-03-14 18:38 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489497964-13734-4-git-send-email-Yuval.Mintz@cavium.com \
    --to=yuval.mintz@cavium.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.