* [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address
@ 2020-04-09 1:59 wangyunjian
2020-04-09 12:46 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: wangyunjian @ 2020-04-09 1:59 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, g.singh, akhil.goyal, jerry.lilijun, xudingke,
Yunjian Wang, stable
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address
2020-04-09 1:59 [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address wangyunjian
@ 2020-04-09 12:46 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2020-04-09 12:46 UTC (permalink / raw)
To: wangyunjian, dev; +Cc: g.singh, akhil.goyal, jerry.lilijun, xudingke, stable
On 4/9/2020 2:59 AM, wangyunjian wrote:
> 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>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-09 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 1:59 [dpdk-dev] [PATCH v2] net/pfe: fix double free of MAC address wangyunjian
2020-04-09 12:46 ` Ferruh Yigit
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).