From: Bruce Richardson <bruce.richardson@intel.com>
To: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
Subject: Re: [PATCH v3 1/3] net/ice: fix possible memory leak
Date: Mon, 22 Jul 2024 11:41:47 +0100 [thread overview]
Message-ID: <Zp43a_aIn06ThDVB@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240722082836.176515-1-vladimir.medvedkin@intel.com>
On Mon, Jul 22, 2024 at 08:28:34AM +0000, Vladimir Medvedkin wrote:
> This patch fixes possible memory leak inside the
> ice_hash_parse_raw_pattern() due to the lack of a call to rte_free()
> for previously allocated pkt_buf and msk_buf.
>
> Fixes: 1b9c68120a1c ("net/ice: enable protocol agnostic flow offloading in RSS")
> Cc: stable@dpdk.org
>
> Reported-by: Michael Theodore Stolarchuk <mike.stolarchuk@arista.com>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
> drivers/net/ice/ice_hash.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
<snip>
> - if (ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt))
> - return -rte_errno;
> + ret = ice_parser_run(ad->psr, pkt_buf, pkt_len, &rslt);
> + if (ret)
> + goto free_mem;
>
> - if (ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
> - pkt_len, ICE_BLK_RSS, true, &prof))
> - return -rte_errno;
> + ret = ice_parser_profile_init(&rslt, pkt_buf, msk_buf,
> + pkt_len, ICE_BLK_RSS, true, &prof);
> + goto free_mem;
Are we not still missing an "if (ret != 0)" here?
If so, I can just add on apply.
/Bruce
next prev parent reply other threads:[~2024-07-22 10:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 16:59 [PATCH] net/ice: fix possible memory leak Vladimir Medvedkin
2024-07-11 17:05 ` Bruce Richardson
2024-07-11 17:07 ` Medvedkin, Vladimir
2024-07-15 18:04 ` [PATCH v2 1/3] " Vladimir Medvedkin
2024-07-15 18:04 ` [PATCH v2 2/3] net/ice: refactor raw pattern parsing function Vladimir Medvedkin
2024-07-17 11:05 ` Bruce Richardson
2024-07-15 18:04 ` [PATCH v2 3/3] net/ice: fix return value for " Vladimir Medvedkin
2024-07-17 11:06 ` Bruce Richardson
2024-07-17 11:04 ` [PATCH v2 1/3] net/ice: fix possible memory leak Bruce Richardson
2024-07-22 8:28 ` [PATCH v3 " Vladimir Medvedkin
2024-07-22 8:28 ` [PATCH v3 2/3] net/ice: refactor raw pattern parsing function Vladimir Medvedkin
2024-07-22 8:28 ` [PATCH v3 3/3] net/ice: fix return value for " Vladimir Medvedkin
2024-07-22 10:41 ` Bruce Richardson [this message]
2024-07-22 11:00 ` [PATCH v3 1/3] net/ice: fix possible memory leak Medvedkin, Vladimir
2024-07-22 10:59 ` [PATCH v4 " Vladimir Medvedkin
2024-07-22 10:59 ` [PATCH v4 2/3] net/ice: refactor raw pattern parsing function Vladimir Medvedkin
2024-07-22 11:25 ` Bruce Richardson
2024-07-22 13:51 ` Medvedkin, Vladimir
2024-07-22 10:59 ` [PATCH v4 3/3] net/ice: fix return value for " Vladimir Medvedkin
2024-07-22 13:50 ` [PATCH v5 1/3] net/ice: fix possible memory leak Vladimir Medvedkin
2024-07-22 13:50 ` [PATCH v5 2/3] net/ice: refactor raw pattern parsing function Vladimir Medvedkin
2024-07-22 15:10 ` Bruce Richardson
2024-07-22 13:50 ` [PATCH v5 3/3] net/ice: fix return value for " Vladimir Medvedkin
2024-07-22 15:11 ` Bruce Richardson
2024-07-22 15:09 ` [PATCH v5 1/3] net/ice: fix possible memory leak Bruce Richardson
2024-07-22 15:18 ` 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=Zp43a_aIn06ThDVB@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mike.stolarchuk@arista.com \
--cc=stable@dpdk.org \
--cc=vladimir.medvedkin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.