patch 'net/intel: fix memory leak on Tx queue setup failure' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:10:04 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/02/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/a623e9d2ac2c971966ec49eb67fbe67897b39c33

Thanks.

Kevin

---
>From a623e9d2ac2c971966ec49eb67fbe67897b39c33 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 11 Feb 2026 18:12:31 +0000
Subject: [PATCH] net/intel: fix memory leak on Tx queue setup failure

[ upstream commit 6528c61f17f7f7732340768049e1931e84c942af ]

When TX queue setup fails after sw_ring allocation but during
completion queue setup, the allocated sw_ring memory is not freed,
causing a memory leak.

This patch adds the missing rte_free() call in the error path for
both cpfl and idpf drivers to properly clean up sw_ring before
returning from the function.

Fixes: 6c2d333cd418 ("net/cpfl: support Tx queue setup")
Fixes: c008a5e740bd ("common/idpf: add queue setup/release")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 drivers/net/intel/cpfl/cpfl_rxtx.c | 1 +
 drivers/net/intel/idpf/idpf_rxtx.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/intel/cpfl/cpfl_rxtx.c b/drivers/net/intel/cpfl/cpfl_rxtx.c
index 453ec975d5..27ffedeea4 100644
--- a/drivers/net/intel/cpfl/cpfl_rxtx.c
+++ b/drivers/net/intel/cpfl/cpfl_rxtx.c
@@ -617,4 +617,5 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 err_complq_setup:
+	rte_free(txq->sw_ring);
 err_sw_ring_alloc:
 	cpfl_dma_zone_release(mz);
diff --git a/drivers/net/intel/idpf/idpf_rxtx.c b/drivers/net/intel/idpf/idpf_rxtx.c
index 4796d8b862..c9979e8f2e 100644
--- a/drivers/net/intel/idpf/idpf_rxtx.c
+++ b/drivers/net/intel/idpf/idpf_rxtx.c
@@ -491,4 +491,5 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 err_complq_setup:
+	rte_free(txq->sw_ring);
 err_sw_ring_alloc:
 	idpf_dma_zone_release(mz);
-- 
2.53.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-02-26 10:16:51.824603990 +0000
+++ 0122-net-intel-fix-memory-leak-on-Tx-queue-setup-failure.patch	2026-02-26 10:16:47.169460190 +0000
@@ -1 +1 @@
-From 6528c61f17f7f7732340768049e1931e84c942af Mon Sep 17 00:00:00 2001
+From a623e9d2ac2c971966ec49eb67fbe67897b39c33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6528c61f17f7f7732340768049e1931e84c942af ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 78bc3e9b49..392a7fcc98 100644
+index 453ec975d5..27ffedeea4 100644
@@ -29 +30 @@
-@@ -629,4 +629,5 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -617,4 +617,5 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -36 +37 @@
-index 8aa44585fe..9317c8b175 100644
+index 4796d8b862..c9979e8f2e 100644
@@ -39 +40 @@
-@@ -503,4 +503,5 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+@@ -491,4 +491,5 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,



More information about the stable mailing list