patch 'net/ice: fix ACL profile segment leak' has been queued to stable release 25.11.5
Kevin Traynor
ktraynor at redhat.com
Thu Dec 3 14:05:28 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/69fdfa94518fc729c4844ab445fdb44348fc82bd
Thanks.
Kevin
---
>From 69fdfa94518fc729c4844ab445fdb44348fc82bd 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/intel/ice/ice_acl_filter.c | 46 +++++++++++---------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
index 7c455a3059..a8fd0ceb09 100644
--- a/drivers/net/intel/ice/ice_acl_filter.c
+++ b/drivers/net/intel/ice/ice_acl_filter.c
@@ -223,60 +223,55 @@ ice_acl_prof_init(struct ice_pf *pf)
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_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);
- 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;
@@ -318,5 +313,4 @@ err_add_prof_ipv4_udp_frag:
ice_flow_rem_prof(hw, ICE_BLK_ACL, ICE_FLTR_PTYPE_NONF_IPV4_OTHER);
err_add_prof:
- ice_free(hw, seg);
return ret;
}
--
2.56.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-12-03 12:52:50.563227196 +0000
+++ 0402-net-ice-fix-ACL-profile-segment-leak.patch 2026-12-03 12:52:39.308711643 +0000
@@ -1 +1 @@
-From 87ece411815dbff6683e6642a01491e0c0335c4b Mon Sep 17 00:00:00 2001
+From 69fdfa94518fc729c4844ab445fdb44348fc82bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87ece411815dbff6683e6642a01491e0c0335c4b ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 21b48e1009..6cf8c83738 100644
+index 7c455a3059..a8fd0ceb09 100644
@@ -27 +28 @@
-@@ -227,60 +227,55 @@ ice_acl_prof_init(struct ice_pf *pf)
+@@ -223,60 +223,55 @@ ice_acl_prof_init(struct ice_pf *pf)
@@ -108 +109 @@
-@@ -322,5 +317,4 @@ err_add_prof_ipv4_udp_frag:
+@@ -318,5 +313,4 @@ err_add_prof_ipv4_udp_frag:
More information about the stable
mailing list