netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.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, rrameshbabu@nvidia.com, vadfed@meta.com,
	ayal@nvidia.com, eranbe@nvidia.com, weiyongjun1@huawei.com,
	yuehaibing@huawei.com
Subject: Re: [PATCH net,v2 2/2] net/mlx5e: fix memory leak in mlx5e_ptp_open
Date: Fri, 30 Jun 2023 15:22:15 +0200	[thread overview]
Message-ID: <ZJ7XB7psFXVCpR53@corigine.com> (raw)
In-Reply-To: <20230630014903.1082615-3-shaozhengchao@huawei.com>

On Fri, Jun 30, 2023 at 09:49:03AM +0800, Zhengchao Shao wrote:
> When kvzalloc_node or kvzalloc failed in mlx5e_ptp_open, the memory
> pointed by "c" or "cparams" is not freed, which can lead to a memory
> leak. Fix by freeing the array in the error path.
> 
> Fixes: 145e5637d941 ("net/mlx5e: Add TX PTP port object support")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
> Reviewed-by: Gal Pressman <gal@nvidia.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


      reply	other threads:[~2023-06-30 13:22 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
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 [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=ZJ7XB7psFXVCpR53@corigine.com \
    --to=simon.horman@corigine.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=rrameshbabu@nvidia.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).