patch 'net/tap: fix resource leaks in secondary process probe' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Mar 19 11:02:45 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/23/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/75d86d9e368d760a11905323f307a9c93220c2ae

Thanks.

Kevin

---
>From 75d86d9e368d760a11905323f307a9c93220c2ae Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Sun, 22 Feb 2026 09:30:44 -0800
Subject: [PATCH] net/tap: fix resource leaks in secondary process probe

[ upstream commit 65d0b2fbb3f451baf6819ec0cc724897a99965eb ]

Four error paths in the secondary-process branch of
rte_pmd_tap_probe() returned -1 without cleanup:

- primary process not alive: leaked eth_dev
- process_private malloc failure: leaked eth_dev
- tap_mp_attach_queues failure: leaked eth_dev and process_private
- rte_mp_action_register failure: leaked eth_dev and process_private

Add secondary_fail and secondary_fail_pp labels to free
process_private and release the ethdev port.

Bugzilla ID: 1881
Fixes: c9aa56edec8e ("net/tap: access primary process queues from secondary")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/tap/rte_eth_tap.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 2c12b56b8e..fd215fa7b9 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -2511,5 +2511,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 		if (!rte_eal_primary_proc_alive(NULL)) {
 			TAP_LOG(ERR, "Primary process is missing");
-			return -1;
+			goto secondary_fail;
 		}
 		eth_dev->process_private = malloc(sizeof(struct pmd_process_private));
@@ -2517,5 +2517,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 			TAP_LOG(ERR,
 				"Failed to alloc memory for process private");
-			return -1;
+			goto secondary_fail;
 		}
 		memset(eth_dev->process_private, 0, sizeof(struct pmd_process_private));
@@ -2523,5 +2523,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 		ret = tap_mp_attach_queues(name, eth_dev);
 		if (ret != 0)
-			return -1;
+			goto secondary_fail_pp;
 
 		if (!tap_devices_count) {
@@ -2530,5 +2530,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 				TAP_LOG(ERR, "tap: Failed to register IPC callback: %s",
 					strerror(rte_errno));
-				return -1;
+				goto secondary_fail_pp;
 			}
 		}
@@ -2536,4 +2536,11 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
+
+secondary_fail_pp:
+		free(eth_dev->process_private);
+		eth_dev->process_private = NULL;
+secondary_fail:
+		rte_eth_dev_release_port(eth_dev);
+		return -1;
 	}
 
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 10:01:08.495071369 +0000
+++ 0047-net-tap-fix-resource-leaks-in-secondary-process-prob.patch	2026-03-19 10:01:07.115898256 +0000
@@ -1 +1 @@
-From 65d0b2fbb3f451baf6819ec0cc724897a99965eb Mon Sep 17 00:00:00 2001
+From 75d86d9e368d760a11905323f307a9c93220c2ae Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 65d0b2fbb3f451baf6819ec0cc724897a99965eb ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index cf886b132c..63d5ac5630 100644
+index 2c12b56b8e..fd215fa7b9 100644
@@ -30 +31 @@
-@@ -2470,5 +2470,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2511,5 +2511,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -37 +38 @@
-@@ -2476,5 +2476,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2517,5 +2517,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -44 +45 @@
-@@ -2482,5 +2482,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2523,5 +2523,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -51 +52 @@
-@@ -2489,5 +2489,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2530,5 +2530,5 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
@@ -58 +59 @@
-@@ -2495,4 +2495,11 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
+@@ -2536,4 +2536,11 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)



More information about the stable mailing list