DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/bonding: fix kvlist memory leakage
@ 2021-04-22  2:05 Min Hu (Connor)
  2021-04-26 13:05 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Min Hu (Connor) @ 2021-04-22  2:05 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, humin29

From: Chengwen Feng <fengchengwen@huawei.com>

If the bond device was created by vdev mode, the kvlist was not free
when the bond device removed.

Fixes: 8d30fe7fa737 ("bonding: support port hotplug")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2e9cea5..25b1f77 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3467,6 +3467,8 @@ bond_remove(struct rte_vdev_device *dev)
 		ret = bond_ethdev_stop(eth_dev);
 		bond_ethdev_close(eth_dev);
 	}
+	if (internals->kvlist != NULL)
+		rte_kvargs_free(internals->kvlist);
 	rte_eth_dev_release_port(eth_dev);
 
 	return ret;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/bonding: fix kvlist memory leakage
  2021-04-22  2:05 [dpdk-dev] [PATCH] net/bonding: fix kvlist memory leakage Min Hu (Connor)
@ 2021-04-26 13:05 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2021-04-26 13:05 UTC (permalink / raw)
  To: Min Hu (Connor), dev

On 4/22/2021 3:05 AM, Min Hu (Connor) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> If the bond device was created by vdev mode, the kvlist was not free
> when the bond device removed.
> 
> Fixes: 8d30fe7fa737 ("bonding: support port hotplug")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-26 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  2:05 [dpdk-dev] [PATCH] net/bonding: fix kvlist memory leakage Min Hu (Connor)
2021-04-26 13:05 ` 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).