DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/3] net/sfc: fix multicast address list copy memory leak
Date: Wed, 13 Dec 2017 07:12:17 +0000	[thread overview]
Message-ID: <1513149138-26298-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1513149138-26298-1-git-send-email-arybchenko@solarflare.com>

Fixes: 295f647a38a2 ("net/sfc: set multicast address list in started state only")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_port.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 55d8d46..d71ec18 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -406,7 +406,10 @@ sfc_port_attach(struct sfc_adapter *sa)
 fail_kvarg_stats_update_period_ms:
 fail_mac_stats_dma_alloc:
 	rte_free(port->mac_stats_buf);
+
 fail_mac_stats_buf_alloc:
+	rte_free(port->mcast_addrs);
+
 fail_mcast_addr_list_buf_alloc:
 	sfc_log_init(sa, "failed %d", rc);
 	return rc;
@@ -422,6 +425,8 @@ sfc_port_detach(struct sfc_adapter *sa)
 	sfc_dma_free(sa, &port->mac_stats_dma_mem);
 	rte_free(port->mac_stats_buf);
 
+	rte_free(port->mcast_addrs);
+
 	sfc_log_init(sa, "done");
 }
 
-- 
2.7.4

  reply	other threads:[~2017-12-13  7:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  7:12 [dpdk-dev] [PATCH 1/3] net/sfc: stop periodic DMA if MAC stats upload fails Andrew Rybchenko
2017-12-13  7:12 ` Andrew Rybchenko [this message]
2017-12-13  7:12 ` [dpdk-dev] [PATCH 3/3] net/sfc: fix DMA memory leak after kvarg processing failure Andrew Rybchenko
2017-12-16  2:04 ` [dpdk-dev] [dpdk-stable] [PATCH 1/3] net/sfc: stop periodic DMA if MAC stats upload fails Ferruh Yigit

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=1513149138-26298-2-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).