patches for DPDK stable branches
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <g.singh@nxp.com>,
	<akhil.goyal@nxp.com>, <jerry.lilijun@huawei.com>,
	<xudingke@huawei.com>, Yunjian Wang <wangyunjian@huawei.com>,
	<stable@dpdk.org>
Subject: [dpdk-stable] [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address
Date: Thu, 9 Apr 2020 09:59:00 +0800	[thread overview]
Message-ID: <1586397540-19668-1-git-send-email-wangyunjian@huawei.com> (raw)

From: Yunjian Wang <wangyunjian@huawei.com>

The 'mac_addrs' freeing has been moved to rte_eth_dev_release_port(),
so freeing 'mac_addrs' like this in pfe_eth_exit() is unnecessary and
will cause double free.

Fixes: 67fc3ff97c39 ("net/pfe: introduce basic functions")
CC: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
v2:
 * remove 'rte_free(dev->data->mac_addrs);' suggested by Ferruh Yigit
 * update commit log
---
 drivers/net/pfe/pfe_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index 940347819..383be4397 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -396,7 +396,6 @@ pfe_eth_exit(struct rte_eth_dev *dev, struct pfe *pfe)
 	/* Close the device file for link status */
 	pfe_eth_close_cdev(dev->data->dev_private);
 
-	rte_free(dev->data->mac_addrs);
 	rte_eth_dev_release_port(dev);
 	pfe->nb_devs--;
 }
-- 
2.19.1



             reply	other threads:[~2020-04-09  1:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-09  1:59 wangyunjian [this message]
2020-04-09 12:46 ` 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=1586397540-19668-1-git-send-email-wangyunjian@huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=g.singh@nxp.com \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=xudingke@huawei.com \
    /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).