patch 'net/intel: fix memory leak on Tx queue setup failure' has been queued to stable release 24.11.5
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Feb 20 15:56:37 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.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 02/22/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/e6759e0f57e5aba92d938d85fcd09b308e630c6b
Thanks.
Luca Boccassi
---
>From e6759e0f57e5aba92d938d85fcd09b308e630c6b 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 47351ca102..1acc1aa7cc 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 b53f642902..fc071b58b4 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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-02-20 14:55:46.867055385 +0000
+++ 0095-net-intel-fix-memory-leak-on-Tx-queue-setup-failure.patch 2026-02-20 14:55:43.340193380 +0000
@@ -1 +1 @@
-From 6528c61f17f7f7732340768049e1931e84c942af Mon Sep 17 00:00:00 2001
+From e6759e0f57e5aba92d938d85fcd09b308e630c6b 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 47351ca102..1acc1aa7cc 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 b53f642902..fc071b58b4 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