patch 'net/dpaa: fix double close and null deref on remove' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 5 17:42:35 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/d710ce44340466736dd40cab7ee068456dee008d
Thanks.
Luca Boccassi
---
>From d710ce44340466736dd40cab7ee068456dee008d Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal at nxp.com>
Date: Fri, 16 Oct 2026 16:49:34 +0530
Subject: [PATCH] net/dpaa: fix double close and null deref on remove
[ upstream commit ee71ea9bd68b8c1de3b869ec5da18a2342d68242 ]
rte_dpaa_remove() closed the port twice:
ret = dpaa_eth_dev_close(eth_dev);
if (eth_dev->state != RTE_ETH_DEV_UNUSED) {
dpaa_eth_dev_close(eth_dev);
The first call ran unconditionally, the second ran again on a port
that had just been torn down. The unconditional call also dereferenced
eth_dev without checking that rte_eth_dev_allocated() found anything.
rte_eth_dev_close() releases the port, so an application that closed
its ports before rte_eal_cleanup() crashed in remove.
Close the port once, only when it is still in use, and log the close
result before releasing the port. The release status is returned,
since the port must be released regardless of how close ended.
Fixes: 78ea4b4fcb52 ("bus/dpaa: improve cleanup")
Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index d7832644b4f..ec88410a798 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -2717,12 +2717,15 @@ rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev)
PMD_INIT_FUNC_TRACE();
- eth_dev = dpaa_dev->eth_dev;
- ret = dpaa_eth_dev_close(eth_dev);
- if (eth_dev->state != RTE_ETH_DEV_UNUSED) {
- dpaa_eth_dev_close(eth_dev);
+ eth_dev = rte_eth_dev_allocated(dpaa_dev->device.name);
+ if (eth_dev != NULL && eth_dev->state != RTE_ETH_DEV_UNUSED) {
+ ret = dpaa_eth_dev_close(eth_dev);
+ if (ret != 0)
+ DPAA_PMD_WARN("%s: close failed(%d), releasing port",
+ dpaa_dev->device.name, ret);
ret = rte_eth_dev_release_port(eth_dev);
}
+
dpaa_valid_dev--;
if (!dpaa_valid_dev)
rte_mempool_free(dpaa_tx_sg_pool);
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-05 16:42:47.570440891 +0000
+++ 0068-net-dpaa-fix-double-close-and-null-deref-on-remove.patch 2026-11-05 16:42:44.997063057 +0000
@@ -1 +1 @@
-From ee71ea9bd68b8c1de3b869ec5da18a2342d68242 Mon Sep 17 00:00:00 2001
+From d710ce44340466736dd40cab7ee068456dee008d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ee71ea9bd68b8c1de3b869ec5da18a2342d68242 ]
+
@@ -23 +24,0 @@
-Cc: stable at dpdk.org
@@ -27,2 +28,2 @@
- drivers/net/dpaa/dpaa_ethdev.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
+ drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
@@ -31 +32 @@
-index 1aaf97f175..a5b02cc9a8 100644
+index d7832644b4f..ec88410a798 100644
@@ -34 +35,2 @@
-@@ -2679,11 +2679,14 @@ rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev)
+@@ -2717,12 +2717,15 @@ rte_dpaa_remove(struct rte_dpaa_device *dpaa_dev)
+
@@ -37 +39 @@
- eth_dev = rte_eth_dev_allocated(dpaa_dev->device.name);
+- eth_dev = dpaa_dev->eth_dev;
@@ -40,0 +43 @@
++ eth_dev = rte_eth_dev_allocated(dpaa_dev->device.name);
More information about the stable
mailing list