From: Leon Romanovsky <leon@kernel.org>
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, valex@nvidia.com, kliteyn@nvidia.com,
mbloch@nvidia.com, danielj@nvidia.com, erezsh@mellanox.com,
saeedm@nvidia.com, weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net,v2] net/mlx5: DR, fix memory leak in mlx5dr_cmd_create_reformat_ctx
Date: Wed, 5 Jul 2023 15:19:56 +0300 [thread overview]
Message-ID: <20230705121956.GO6455@unreal> (raw)
In-Reply-To: <20230705121527.2230772-1-shaozhengchao@huawei.com>
On Wed, Jul 05, 2023 at 08:15:27PM +0800, Zhengchao Shao wrote:
> when mlx5_cmd_exec failed in mlx5dr_cmd_create_reformat_ctx, the memory
> pointed by 'in' is not released, which will cause memory leak. Move memory
> release after mlx5_cmd_exec.
>
> Fixes: 1d9186476e12 ("net/mlx5: DR, Add direct rule command utilities")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> v2: goto label 'err_free_in' to free 'in'
> ---
> drivers/net/ethernet/mellanox/mlx5/core/steering/dr_cmd.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
prev parent reply other threads:[~2023-07-05 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 12:15 [PATCH net,v2] net/mlx5: DR, fix memory leak in mlx5dr_cmd_create_reformat_ctx Zhengchao Shao
2023-07-05 12:19 ` Leon Romanovsky [this message]
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=20230705121956.GO6455@unreal \
--to=leon@kernel.org \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=erezsh@mellanox.com \
--cc=kliteyn@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=shaozhengchao@huawei.com \
--cc=valex@nvidia.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).