patch 'net/dpaa: fix resource leak on probe failure' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:03:49 CET 2026
Hi,
FYI, your patch has been queued to stable release 25.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/fe5fa51f4e60d253c8920d9393cd482bf21a4689
Thanks.
Kevin
---
>From fe5fa51f4e60d253c8920d9393cd482bf21a4689 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 512cac0ff0..25e4ee1957 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2609,22 +2609,28 @@ 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.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:47.795098423 +0000
+++ 0303-net-dpaa-fix-resource-leak-on-probe-failure.patch 2026-12-03 12:52:39.240484701 +0000
@@ -1 +1 @@
-From af4351ad8518fbfc035e2b9ebc47da89e4b04855 Mon Sep 17 00:00:00 2001
+From fe5fa51f4e60d253c8920d9393cd482bf21a4689 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 512cac0ff0..25e4ee1957 100644
@@ -24 +25 @@
-@@ -2603,22 +2603,28 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
+@@ -2609,22 +2609,28 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
More information about the stable
mailing list