patch 'net/ice: fix ACL profile segment leak' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 16 23:51:51 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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

Thanks.

Luca Boccassi

---
>From 42f78dcdd0c30e4f8591175e19aaeb399a828945 Mon Sep 17 00:00:00 2001
From: Anurag Mandal <anurag.mandal at intel.com>
Date: Mon, 2 Nov 2026 08:10:37 +0000
Subject: [PATCH] net/ice: fix ACL profile segment leak

[ upstream commit 87ece411815dbff6683e6642a01491e0c0335c4b ]

ice_acl_prof_init() allocates a flow segment to add the ACL profiles,
but only frees it on the error path, so it leaks on every ACL engine
init.

ice_flow_add_prof() copies the segments, so the buffer is only needed
while adding the profiles.

Allocate it on the stack instead, which removes the need to free it.

Fixes: 40d466fa9f76 ("net/ice: support ACL filter in DCF")

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
 drivers/net/ice/ice_acl_filter.c | 38 ++++++++++++++------------------
 1 file changed, 16 insertions(+), 22 deletions(-)

diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index e3828751ad..67c2a25c77 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -220,53 +220,48 @@ ice_acl_prof_init(struct ice_pf *pf)
 	struct ice_flow_prof *prof_ipv4_udp = NULL;
 	struct ice_flow_prof *prof_ipv4_tcp = NULL;
 	struct ice_flow_prof *prof_ipv4_sctp = NULL;
-	struct ice_flow_seg_info *seg;
+	struct ice_flow_seg_info seg = {0};
 	int i;
 	int ret;
 
-	seg = (struct ice_flow_seg_info *)
-		 ice_malloc(hw, sizeof(*seg));
-	if (!seg)
-		return -ENOMEM;
-
-	ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV4);
-	acl_add_prof_prepare(hw, seg, false, 0, 0);
+	ICE_FLOW_SET_HDRS(&seg, ICE_FLOW_SEG_HDR_IPV4);
+	acl_add_prof_prepare(hw, &seg, false, 0, 0);
 	ret = ice_flow_add_prof(hw, ICE_BLK_ACL, ICE_FLOW_RX,
 				ICE_FLTR_PTYPE_NONF_IPV4_OTHER,
-				seg, 1, NULL, 0, &prof_ipv4);
+				&seg, 1, NULL, 0, &prof_ipv4);
 	if (ret)
 		goto err_add_prof;
 
-	ice_memset(seg, 0, sizeof(*seg), ICE_NONDMA_MEM);
-	ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV4);
-	acl_add_prof_prepare(hw, seg, true,
+	ice_memset(&seg, 0, sizeof(seg), ICE_NONDMA_MEM);
+	ICE_FLOW_SET_HDRS(&seg, ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_IPV4);
+	acl_add_prof_prepare(hw, &seg, true,
 			     ICE_FLOW_FIELD_IDX_UDP_SRC_PORT,
 			     ICE_FLOW_FIELD_IDX_UDP_DST_PORT);
 	ret = ice_flow_add_prof(hw, ICE_BLK_ACL, ICE_FLOW_RX,
 				ICE_FLTR_PTYPE_NONF_IPV4_UDP,
-				seg, 1, NULL, 0, &prof_ipv4_udp);
+				&seg, 1, NULL, 0, &prof_ipv4_udp);
 	if (ret)
 		goto err_add_prof_ipv4_udp;
 
-	ice_memset(seg, 0, sizeof(*seg), ICE_NONDMA_MEM);
-	ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV4);
-	acl_add_prof_prepare(hw, seg, true,
+	ice_memset(&seg, 0, sizeof(seg), ICE_NONDMA_MEM);
+	ICE_FLOW_SET_HDRS(&seg, ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_IPV4);
+	acl_add_prof_prepare(hw, &seg, true,
 			     ICE_FLOW_FIELD_IDX_TCP_SRC_PORT,
 			     ICE_FLOW_FIELD_IDX_TCP_DST_PORT);
 	ret = ice_flow_add_prof(hw, ICE_BLK_ACL, ICE_FLOW_RX,
 				ICE_FLTR_PTYPE_NONF_IPV4_TCP,
-				seg, 1, NULL, 0, &prof_ipv4_tcp);
+				&seg, 1, NULL, 0, &prof_ipv4_tcp);
 	if (ret)
 		goto err_add_prof_ipv4_tcp;
 
-	ice_memset(seg, 0, sizeof(*seg), ICE_NONDMA_MEM);
-	ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4);
-	acl_add_prof_prepare(hw, seg, true,
+	ice_memset(&seg, 0, sizeof(seg), ICE_NONDMA_MEM);
+	ICE_FLOW_SET_HDRS(&seg, ICE_FLOW_SEG_HDR_SCTP | ICE_FLOW_SEG_HDR_IPV4);
+	acl_add_prof_prepare(hw, &seg, true,
 			     ICE_FLOW_FIELD_IDX_SCTP_SRC_PORT,
 			     ICE_FLOW_FIELD_IDX_SCTP_DST_PORT);
 	ret = ice_flow_add_prof(hw, ICE_BLK_ACL, ICE_FLOW_RX,
 				ICE_FLTR_PTYPE_NONF_IPV4_SCTP,
-				seg, 1, NULL, 0, &prof_ipv4_sctp);
+				&seg, 1, NULL, 0, &prof_ipv4_sctp);
 	if (ret)
 		goto err_add_prof_ipv4_sctp;
 
@@ -298,7 +293,6 @@ err_add_prof_ipv4_tcp:
 err_add_prof_ipv4_udp:
 	ice_flow_rem_prof(hw, ICE_BLK_ACL, ICE_FLTR_PTYPE_NONF_IPV4_OTHER);
 err_add_prof:
-	ice_free(hw, seg);
 	return ret;
 }
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-16 22:52:17.993435262 +0000
+++ 0037-net-ice-fix-ACL-profile-segment-leak.patch	2026-11-16 22:52:16.476233166 +0000
@@ -1 +1 @@
-From 87ece411815dbff6683e6642a01491e0c0335c4b Mon Sep 17 00:00:00 2001
+From 42f78dcdd0c30e4f8591175e19aaeb399a828945 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87ece411815dbff6683e6642a01491e0c0335c4b ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -20,2 +21,2 @@
- drivers/net/intel/ice/ice_acl_filter.c | 46 +++++++++++---------------
- 1 file changed, 20 insertions(+), 26 deletions(-)
+ drivers/net/ice/ice_acl_filter.c | 38 ++++++++++++++------------------
+ 1 file changed, 16 insertions(+), 22 deletions(-)
@@ -23,5 +24,5 @@
-diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
-index 21b48e1009..6cf8c83738 100644
---- a/drivers/net/intel/ice/ice_acl_filter.c
-+++ b/drivers/net/intel/ice/ice_acl_filter.c
-@@ -226,62 +226,57 @@ ice_acl_prof_init(struct ice_pf *pf)
+diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
+index e3828751ad..67c2a25c77 100644
+--- a/drivers/net/ice/ice_acl_filter.c
++++ b/drivers/net/ice/ice_acl_filter.c
+@@ -220,53 +220,48 @@ ice_acl_prof_init(struct ice_pf *pf)
@@ -53,13 +53,0 @@
--	ICE_FLOW_SET_HDRS(seg, ICE_FLOW_SEG_HDR_IPV_FRAG);
--	acl_add_prof_prepare(hw, seg, false, 0, 0);
-+	ice_memset(&seg, 0, sizeof(seg), ICE_NONDMA_MEM);
-+	ICE_FLOW_SET_HDRS(&seg, ICE_FLOW_SEG_HDR_IPV_FRAG);
-+	acl_add_prof_prepare(hw, &seg, false, 0, 0);
- 	ret = ice_flow_add_prof(hw, ICE_BLK_ACL, ICE_FLOW_RX,
- 				ICE_FLTR_PTYPE_FRAG_IPV4,
--				seg, 1, NULL, 0, &prof_ipv4_frag);
-+				&seg, 1, NULL, 0, &prof_ipv4_frag);
- 	if (ret)
- 		goto err_add_prof_ipv4_udp_frag;
- 
--	ice_memset(seg, 0, sizeof(*seg), ICE_NONDMA_MEM);
@@ -110,2 +98,2 @@
-@@ -321,7 +316,6 @@ err_add_prof_ipv4_udp:
- err_add_prof_ipv4_udp_frag:
+@@ -298,7 +293,6 @@ err_add_prof_ipv4_tcp:
+ err_add_prof_ipv4_udp:


More information about the stable mailing list