patch 'net/ice: fix FDIR resource leak on setup failure' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:05:27 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/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/9d285d9843926e97f029fa9e841321ce04d3f086

Thanks.

Kevin

---
>From 9d285d9843926e97f029fa9e841321ce04d3f086 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Mon, 2 Nov 2026 08:10:36 +0000
Subject: [PATCH] net/ice: fix FDIR resource leak on setup failure

[ upstream commit 3aab943fa83057506dc167e757bc01c16b67026f ]

ice_fdir_setup() returns directly when the filter list or counter
initialization fails, leaking the FDIR VSI, plus the filter hash table
and map in the counter case. Its other error paths release the queues
and the VSI, but not the hash table, hash map or counter pools.

As fdir_vsi is reset on failure, ice_fdir_teardown() cannot release
them later either. The hash table name also stays registered, so the
next FDIR setup for the device fails.

Release everything set up so far on all error paths.

Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")
Fixes: 0f880c3df192 ("net/ice: add flow director counter resource init/release")
Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/net/intel/ice/ice_fdir_filter.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
index 9e9287f6c2..7c7174791d 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -473,5 +473,6 @@ ice_fdir_setup(struct ice_pf *pf)
 	if (err) {
 		PMD_DRV_LOG(ERR, "Failed to init FDIR filter list.");
-		return -EINVAL;
+		err = -EINVAL;
+		goto fail_filter_list;
 	}
 
@@ -479,5 +480,6 @@ ice_fdir_setup(struct ice_pf *pf)
 	if (err) {
 		PMD_DRV_LOG(ERR, "Failed to init FDIR counter.");
-		return -EINVAL;
+		err = -EINVAL;
+		goto fail_counter;
 	}
 
@@ -550,4 +552,8 @@ fail_setup_rx:
 	pf->fdir.txq = NULL;
 fail_setup_tx:
+	ice_fdir_counter_release(pf);
+fail_counter:
+	ice_fdir_release_filter_list(pf);
+fail_filter_list:
 	ice_release_vsi(vsi);
 	pf->fdir.fdir_vsi = NULL;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:50.534808970 +0000
+++ 0401-net-ice-fix-FDIR-resource-leak-on-setup-failure.patch	2026-12-03 12:52:39.307938796 +0000
@@ -1 +1 @@
-From 3aab943fa83057506dc167e757bc01c16b67026f Mon Sep 17 00:00:00 2001
+From 9d285d9843926e97f029fa9e841321ce04d3f086 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3aab943fa83057506dc167e757bc01c16b67026f ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 2350bd5523..44604cfae6 100644
+index 9e9287f6c2..7c7174791d 100644
@@ -32 +33 @@
-@@ -478,5 +478,6 @@ ice_fdir_setup(struct ice_pf *pf)
+@@ -473,5 +473,6 @@ ice_fdir_setup(struct ice_pf *pf)
@@ -40 +41 @@
-@@ -484,5 +485,6 @@ ice_fdir_setup(struct ice_pf *pf)
+@@ -479,5 +480,6 @@ ice_fdir_setup(struct ice_pf *pf)
@@ -48 +49 @@
-@@ -555,4 +557,8 @@ fail_setup_rx:
+@@ -550,4 +552,8 @@ fail_setup_rx:



More information about the stable mailing list