patch 'net/nfp: fix resource leak in secondary process' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Fri Jul 12 12:44:12 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=57fc3f569eb0478ac4a151fa001798b47d580b24

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 57fc3f569eb0478ac4a151fa001798b47d580b24 Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he at corigine.com>
Date: Fri, 19 Apr 2024 13:23:42 +0800
Subject: [PATCH] net/nfp: fix resource leak in secondary process
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit db8150de1557ff9abd50de22d63723d7cfe3a297 ]

Fix one resource leak problem in the abnormal logic of secondary process.

Fixes: 016141b18b3a ("net/nfp: refactor secondary process probe")

Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 7baacd18b0..e632051d42 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1509,7 +1509,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 	if (sym_tbl == NULL) {
 		PMD_INIT_LOG(ERR, "Something is wrong with the firmware symbol table");
 		ret = -EIO;
-		goto pf_cleanup;
+		goto cpp_cleanup;
 	}
 
 	/* Read the app ID of the firmware loaded */
@@ -1556,6 +1556,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
 
 sym_tbl_cleanup:
 	free(sym_tbl);
+cpp_cleanup:
+	nfp_cpp_free(cpp);
 pf_cleanup:
 	rte_free(pf_dev);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-12 18:40:15.435480667 +0800
+++ 0026-net-nfp-fix-resource-leak-in-secondary-process.patch	2024-07-12 18:40:13.986594241 +0800
@@ -1 +1 @@
-From db8150de1557ff9abd50de22d63723d7cfe3a297 Mon Sep 17 00:00:00 2001
+From 57fc3f569eb0478ac4a151fa001798b47d580b24 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit db8150de1557ff9abd50de22d63723d7cfe3a297 ]
@@ -9 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index b711e15b9f..98d8e87028 100644
+index 7baacd18b0..e632051d42 100644
@@ -22 +24 @@
-@@ -2123,7 +2123,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
+@@ -1509,7 +1509,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
@@ -26 +28 @@
--		goto sync_free;
+-		goto pf_cleanup;
@@ -31 +33 @@
-@@ -2171,6 +2171,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
+@@ -1556,6 +1556,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
@@ -37,2 +38,0 @@
- sync_free:
- 	nfp_sync_free(sync);
@@ -39,0 +40,2 @@
+ 	rte_free(pf_dev);
+ 


More information about the stable mailing list