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

Shani Peretz shperetz at nvidia.com
Tue Mar 31 08:24:48 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

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

Thanks.

Shani

---
>From ea193964635b67ce6c44ff1bbb9da10497c68545 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/cpfl/cpfl_rxtx.c | 1 +
 drivers/net/idpf/idpf_rxtx.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/cpfl/cpfl_rxtx.c b/drivers/net/cpfl/cpfl_rxtx.c
index ab8bec4645..561d60e62c 100644
--- a/drivers/net/cpfl/cpfl_rxtx.c
+++ b/drivers/net/cpfl/cpfl_rxtx.c
@@ -621,6 +621,7 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	return 0;
 
 err_complq_setup:
+	rte_free(txq->sw_ring);
 err_sw_ring_alloc:
 	cpfl_dma_zone_release(mz);
 err_mz_reserve:
diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
index 5dff445a3c..a8d8397cbe 100644
--- a/drivers/net/idpf/idpf_rxtx.c
+++ b/drivers/net/idpf/idpf_rxtx.c
@@ -495,6 +495,7 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	return 0;
 
 err_complq_setup:
+	rte_free(txq->sw_ring);
 err_sw_ring_alloc:
 	idpf_dma_zone_release(mz);
 err_mz_reserve:
-- 
2.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-31 00:32:36.937074427 +0300
+++ 0089-net-intel-fix-memory-leak-on-Tx-queue-setup-failure.patch	2026-03-31 00:32:29.669286000 +0300
@@ -1 +1 @@
-From 6528c61f17f7f7732340768049e1931e84c942af Mon Sep 17 00:00:00 2001
+From ea193964635b67ce6c44ff1bbb9da10497c68545 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6528c61f17f7f7732340768049e1931e84c942af ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -21,2 +22,2 @@
- drivers/net/intel/cpfl/cpfl_rxtx.c | 1 +
- drivers/net/intel/idpf/idpf_rxtx.c | 1 +
+ drivers/net/cpfl/cpfl_rxtx.c | 1 +
+ drivers/net/idpf/idpf_rxtx.c | 1 +
@@ -25,5 +26,5 @@
-diff --git a/drivers/net/intel/cpfl/cpfl_rxtx.c b/drivers/net/intel/cpfl/cpfl_rxtx.c
-index 78bc3e9b49..392a7fcc98 100644
---- a/drivers/net/intel/cpfl/cpfl_rxtx.c
-+++ b/drivers/net/intel/cpfl/cpfl_rxtx.c
-@@ -628,6 +628,7 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+diff --git a/drivers/net/cpfl/cpfl_rxtx.c b/drivers/net/cpfl/cpfl_rxtx.c
+index ab8bec4645..561d60e62c 100644
+--- a/drivers/net/cpfl/cpfl_rxtx.c
++++ b/drivers/net/cpfl/cpfl_rxtx.c
+@@ -621,6 +621,7 @@ cpfl_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
@@ -37,5 +38,5 @@
-diff --git a/drivers/net/intel/idpf/idpf_rxtx.c b/drivers/net/intel/idpf/idpf_rxtx.c
-index 8aa44585fe..9317c8b175 100644
---- a/drivers/net/intel/idpf/idpf_rxtx.c
-+++ b/drivers/net/intel/idpf/idpf_rxtx.c
-@@ -502,6 +502,7 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
+diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
+index 5dff445a3c..a8d8397cbe 100644
+--- a/drivers/net/idpf/idpf_rxtx.c
++++ b/drivers/net/idpf/idpf_rxtx.c
+@@ -495,6 +495,7 @@ idpf_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,


More information about the stable mailing list