[dpdk-stable] patch 'net/bonding: fix memory leak on closing device' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:29:15 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8532dae4d660e197c618399a1350d658cbc8c38b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu at intel.com>
Date: Wed, 15 Sep 2021 13:08:02 +0800
Subject: [PATCH] net/bonding: fix memory leak on closing device
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]

If the bond device was created by vdev mode, the kvlist was not free
after the bond device was closed.

This patch fixes it.

Fixes: 144dc4739975 ("net/bonding: fix leak on remove")

Signed-off-by: Dapeng Yu <dapengx.yu at intel.com>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index a1d3703e96..baa01b17e5 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 	 */
 	rte_mempool_free(internals->mode6.mempool);
 
+	if (internals->kvlist != NULL)
+		rte_kvargs_free(internals->kvlist);
+
 	return 0;
 }
 
@@ -3467,8 +3470,6 @@ 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.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:05.226143855 +0800
+++ 0071-net-bonding-fix-memory-leak-on-closing-device.patch	2021-11-10 14:17:01.830746418 +0800
@@ -1 +1 @@
-From ccf0f002d2ec5455102c0259f44535944aa4b154 Mon Sep 17 00:00:00 2001
+From 8532dae4d660e197c618399a1350d658cbc8c38b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit ccf0f002d2ec5455102c0259f44535944aa4b154 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 8ed9e036f4..54987d96b3 100644
+index a1d3703e96..baa01b17e5 100644
@@ -24 +26 @@
-@@ -2159,6 +2159,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
+@@ -2152,6 +2152,9 @@ bond_ethdev_close(struct rte_eth_dev *dev)
@@ -34 +36 @@
-@@ -3471,8 +3474,6 @@ bond_remove(struct rte_vdev_device *dev)
+@@ -3467,8 +3470,6 @@ bond_remove(struct rte_vdev_device *dev)


More information about the stable mailing list