From: "Medvedkin, Vladimir" <vladimir.medvedkin@intel.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>, <dev@dpdk.org>,
"Bruce Richardson" <bruce.richardson@intel.com>,
Junfeng Guo <junfengg@nvidia.com>,
Qi Zhang <qi.z.zhang@intel.com>
Subject: Re: [PATCH v4 9/9] net/ice: fix memory leak in FDIR flow parsing
Date: Wed, 11 Feb 2026 16:06:39 +0000 [thread overview]
Message-ID: <af459cc2-2fbe-43ce-9d62-881ec6a11cde@intel.com> (raw)
In-Reply-To: <cefd2925e79387e684ddf08eb154f2fd7ad39b5b.1770817694.git.anatoly.burakov@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
On 2/11/2026 1:49 PM, Anatoly Burakov wrote:
> Currently, RAW pattern parsing will cause a `pkt_buf` buffer to be
> allocated to store parsed RAW pattern bytes. All error paths handle the
> deallocation correctly, and the buffer will then be passed to FDIR filter
> create function which also handles the presence of the buffer correctly,
> and it is also freed correctly in destroy function.
>
> However, rte_flow_validate will go through the same code path, but will not
> call FDIR create/destroy nor even store the pointer, because `meta`
> variable inside the flow parsing function will be set to NULL, which will
> cause this memory to be leaked (and memset(0)-ed next time we try to
> create/validate another flow).
>
> Fix it by freeing the `pkt_buf` when `meta` is NULL.
>
> Fixes: 25be39cc1760 ("net/ice: enable protocol agnostic flow offloading in FDIR")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
> drivers/net/intel/ice/ice_fdir_filter.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
> index f7730ec6ab..5abdcbac7f 100644
> --- a/drivers/net/intel/ice/ice_fdir_filter.c
> +++ b/drivers/net/intel/ice/ice_fdir_filter.c
> @@ -2497,8 +2497,12 @@ ice_fdir_parse(struct ice_adapter *ad,
> if (ret)
> goto error;
>
> - if (meta)
> + /* if meta is NULL we're validating so the flow won't be stored */
> + if (meta) {
> *meta = filter;
> + } else if (filter->pkt_buf != NULL) {
> + rte_free(filter->pkt_buf);
> + }
>
> rte_free(item);
> return ret;
--
Regards,
Vladimir
next prev parent reply other threads:[~2026-02-11 16:06 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 12:58 [PATCH v1 1/4] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-09 12:58 ` [PATCH v1 2/4] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-09 12:58 ` [PATCH v1 3/4] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-09 14:40 ` Radu Nicolau
2026-02-09 12:58 ` [PATCH v1 4/4] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-09 14:40 ` Radu Nicolau
2026-02-10 15:52 ` [PATCH v2 1/7] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 2/7] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 3/7] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 4/7] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 5/7] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 6/7] net/iavf: fix IPv4 flow subscription Anatoly Burakov
2026-02-10 15:52 ` [PATCH v2 7/7] net/ice: fix memory leak in DCF QoS bandwidth config Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 0/8] Assortment of bug fixes for Intel PMD's Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 1/8] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 2/8] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 3/8] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 4/8] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 5/8] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 6/8] net/iavf: fix IPv4 flow subscription Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 7/8] net/ice: fix memory leak in DCF QoS bandwidth config Anatoly Burakov
2026-02-11 13:03 ` [PATCH v3 8/8] net/ice: fix memory leak in FDIR flow parsing Anatoly Burakov
2026-02-11 13:49 ` [PATCH v4 0/9] Assortment of bug fixes for Intel PMD's Anatoly Burakov
2026-02-11 13:49 ` [PATCH v4 1/9] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-11 15:17 ` Medvedkin, Vladimir
2026-02-11 21:57 ` Kwapulinski, Piotr
2026-02-11 13:49 ` [PATCH v4 2/9] net/ixgbe: fix memory leak in security flows Anatoly Burakov
2026-02-11 15:28 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 3/9] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-11 15:38 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 4/9] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
2026-02-11 15:40 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 5/9] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-11 15:45 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 6/9] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-11 15:52 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 7/9] net/iavf: fix IPv4 flow subscription Anatoly Burakov
2026-02-11 15:53 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 8/9] net/ice: fix memory leak in DCF QoS bandwidth config Anatoly Burakov
2026-02-11 15:56 ` Medvedkin, Vladimir
2026-02-11 13:49 ` [PATCH v4 9/9] net/ice: fix memory leak in FDIR flow parsing Anatoly Burakov
2026-02-11 16:06 ` Medvedkin, Vladimir [this message]
2026-02-12 12:53 ` [PATCH v5 00/12] Assortment of bug fixes for Intel PMD's Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 01/12] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 02/12] net/ixgbe: fix memory leak in security flows Anatoly Burakov
2026-02-12 17:10 ` Bruce Richardson
2026-02-12 17:14 ` Bruce Richardson
2026-02-13 8:44 ` Burakov, Anatoly
2026-02-13 8:50 ` Bruce Richardson
2026-02-12 17:19 ` Radu Nicolau
2026-02-12 12:53 ` [PATCH v5 03/12] net/ixgbe: fix potential null dereference in IPsec Anatoly Burakov
2026-02-12 17:13 ` Bruce Richardson
2026-02-12 17:19 ` Radu Nicolau
2026-02-12 12:53 ` [PATCH v5 04/12] " Anatoly Burakov
2026-02-12 17:15 ` Bruce Richardson
2026-02-12 17:19 ` Radu Nicolau
2026-02-12 12:53 ` [PATCH v5 05/12] net/ixgbe: fix wrong pointer handling " Anatoly Burakov
2026-02-12 14:50 ` Burakov, Anatoly
2026-02-12 17:17 ` Bruce Richardson
2026-02-12 17:21 ` Radu Nicolau
2026-02-13 8:40 ` Burakov, Anatoly
2026-02-12 17:18 ` Radu Nicolau
2026-02-12 12:53 ` [PATCH v5 06/12] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 07/12] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 08/12] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 09/12] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 10/12] net/iavf: fix IPv4 flow subscription Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 11/12] net/ice: fix memory leak in DCF QoS bandwidth config Anatoly Burakov
2026-02-12 12:53 ` [PATCH v5 12/12] net/ice: fix memory leak in FDIR flow parsing Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 00/12] Assortment of bug fixes for Intel PMD's Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 01/12] net/ixgbe: add missing E610 MAC type checks Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 02/12] net/ixgbe: fix memory leak in security flows Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 03/12] net/ixgbe: fix potential null dereference in IPsec Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 04/12] " Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 05/12] net/ixgbe: fix wrong pointer handling " Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 06/12] net/i40e: move FDIR config to flow create Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 07/12] net/i40e: fix IPv6 GTPU handling Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 08/12] net/iavf: fix memory leak on egress IPsec flows Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 09/12] net/iavf: fix memory leak on uninit Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 10/12] net/iavf: fix IPv4 flow subscription Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 11/12] net/ice: fix memory leak in DCF QoS bandwidth config Anatoly Burakov
2026-02-13 9:10 ` [PATCH v6 12/12] net/ice: fix memory leak in FDIR flow parsing Anatoly Burakov
2026-02-13 10:10 ` [PATCH v6 00/12] Assortment of bug fixes for Intel PMD's Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=af459cc2-2fbe-43ce-9d62-881ec6a11cde@intel.com \
--to=vladimir.medvedkin@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=junfengg@nvidia.com \
--cc=qi.z.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox