patch 'net/dpaa: fix resource leak on probe failure' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:42:37 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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/07/26. 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f2897e15b216668188f16fc19c2757f904dcd093

Thanks.

Luca Boccassi

---
>From f2897e15b216668188f16fc19c2757f904dcd093 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal at nxp.com>
Date: Fri, 16 Oct 2026 16:49:36 +0530
Subject: [PATCH] net/dpaa: fix resource leak on probe failure

[ upstream commit af4351ad8518fbfc035e2b9ebc47da89e4b04855 ]

When the shared Tx scatter-gather mempool cannot be created,
rte_dpaa_probe() returns -ENOMEM directly:

Unwind through cleanup labels so the failure path closes the device and
releases the port, matching the existing dpaa_dev_init() failure path.

Fixes: 533c31cc8331 ("net/dpaa: use internal mempool for SG table")

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 36 ++++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 15 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c4091e90f3a..78be4512112 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2641,24 +2641,30 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
 
 	/* Invoke PMD device initialization function */
 	diag = dpaa_dev_init(eth_dev);
-	if (diag == 0) {
-		if (!dpaa_tx_sg_pool) {
-			dpaa_tx_sg_pool =
-				rte_pktmbuf_pool_create("dpaa_mbuf_tx_sg_pool",
-				DPAA_POOL_SIZE,
-				DPAA_POOL_CACHE_SIZE, 0,
-				DPAA_MAX_SGS * sizeof(struct qm_sg_entry),
-				rte_socket_id());
-			if (dpaa_tx_sg_pool == NULL) {
-				DPAA_PMD_ERR("SG pool creation failed");
-				return -ENOMEM;
-			}
+	if (diag != 0)
+		goto release_port;
+
+	if (dpaa_tx_sg_pool == NULL) {
+		dpaa_tx_sg_pool =
+			rte_pktmbuf_pool_create("dpaa_mbuf_tx_sg_pool",
+			DPAA_POOL_SIZE,
+			DPAA_POOL_CACHE_SIZE, 0,
+			DPAA_MAX_SGS * sizeof(struct qm_sg_entry),
+			rte_socket_id());
+		if (dpaa_tx_sg_pool == NULL) {
+			DPAA_PMD_ERR("SG pool creation failed");
+			diag = -ENOMEM;
+			goto close_dev;
 		}
-		rte_eth_dev_probing_finish(eth_dev);
-		dpaa_valid_dev++;
-		return 0;
 	}
 
+	rte_eth_dev_probing_finish(eth_dev);
+	dpaa_valid_dev++;
+	return 0;
+
+close_dev:
+	dpaa_eth_dev_close(eth_dev);
+release_port:
 	rte_eth_dev_release_port(eth_dev);
 	return diag;
 }
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:47.643359803 +0000
+++ 0070-net-dpaa-fix-resource-leak-on-probe-failure.patch	2026-11-05 16:42:45.001063177 +0000
@@ -1 +1 @@
-From af4351ad8518fbfc035e2b9ebc47da89e4b04855 Mon Sep 17 00:00:00 2001
+From f2897e15b216668188f16fc19c2757f904dcd093 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af4351ad8518fbfc035e2b9ebc47da89e4b04855 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 10b90417de..2f6e2d20a3 100644
+index c4091e90f3a..78be4512112 100644
@@ -24 +25 @@
-@@ -2602,24 +2602,30 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
+@@ -2641,24 +2641,30 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,


More information about the stable mailing list