From: Rahul Rameshbabu <rrameshbabu@nvidia.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: <netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <richardcochran@gmail.com>,
<saeedm@nvidia.com>, <leon@kernel.org>, <lkayal@nvidia.com>,
<tariqt@nvidia.com>, <gal@nvidia.com>, <vadfed@meta.com>,
<ayal@nvidia.com>, <eranbe@nvidia.com>,
<weiyongjun1@huawei.com>, <yuehaibing@huawei.com>
Subject: Re: [PATCH net,v2 1/2] net/mlx5e: fix memory leak in mlx5e_fs_tt_redirect_any_create
Date: Thu, 29 Jun 2023 20:18:51 -0700 [thread overview]
Message-ID: <877crlbpt0.fsf@nvidia.com> (raw)
In-Reply-To: <20230630014903.1082615-2-shaozhengchao@huawei.com> (Zhengchao Shao's message of "Fri, 30 Jun 2023 09:49:02 +0800")
On Fri, 30 Jun, 2023 09:49:02 +0800 Zhengchao Shao <shaozhengchao@huawei.com> wrote:
> The memory pointed to by the fs->any pointer is not freed in the error
> path of mlx5e_fs_tt_redirect_any_create, which can lead to a memory leak.
> Fix by freeing the memory in the error path, thereby making the error path
> identical to mlx5e_fs_tt_redirect_any_destroy().
>
> Fixes: 0f575c20bf06 ("net/mlx5e: Introduce Flow Steering ANY API")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> ---
> v2: update the 'any' member reference in fs to NULL before free fs_any
> ---
Thank you for contributing.
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
next prev parent reply other threads:[~2023-06-30 3:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 1:49 [PATCH net,v2 0/2] fix two memory leak issues for mlx5en driver Zhengchao Shao
2023-06-30 1:49 ` [PATCH net,v2 1/2] net/mlx5e: fix memory leak in mlx5e_fs_tt_redirect_any_create Zhengchao Shao
2023-06-30 3:18 ` Rahul Rameshbabu [this message]
2023-06-30 1:49 ` [PATCH net,v2 2/2] net/mlx5e: fix memory leak in mlx5e_ptp_open Zhengchao Shao
2023-06-30 13:22 ` Simon Horman
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=877crlbpt0.fsf@nvidia.com \
--to=rrameshbabu@nvidia.com \
--cc=ayal@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eranbe@nvidia.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkayal@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=shaozhengchao@huawei.com \
--cc=tariqt@nvidia.com \
--cc=vadfed@meta.com \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).