public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: Saeed Mahameed <saeedm@nvidia.com>,
	"prathameshdeshpande7@gmail.com" <prathameshdeshpande7@gmail.com>,
	Carolina Jubran <cjubran@nvidia.com>,
	"leon@kernel.org" <leon@kernel.org>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v1] net/mlx5: Fix HCA caps leak on notifier init failure
Date: Wed, 15 Apr 2026 08:26:10 +0000	[thread overview]
Message-ID: <314cbe51501c36fc8a44bebe8ec7dac068aa1f3b.camel@nvidia.com> (raw)
In-Reply-To: <20260415005022.34764-1-prathameshdeshpande7@gmail.com>

On Wed, 2026-04-15 at 01:49 +0100, Prathamesh Deshpande wrote:
> mlx5_mdev_init() allocates HCA caps via mlx5_hca_caps_alloc() before
> calling mlx5_notifiers_init(). If notifier initialization fails, the
> error path jumps to err_hca_caps and skips mlx5_hca_caps_free(),
> leaking
> allocated caps.
> 
> Add a dedicated unwind label for notifier-init failure that frees HCA
> caps before continuing the existing cleanup sequence.
> 
> Fixes: b6b03097f982 ("net/mlx5: Initialize events outside devlink
> lock")

Thank you for the fix, LGTM!

> Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>

Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>

      reply	other threads:[~2026-04-15  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  0:49 [PATCH net v1] net/mlx5: Fix HCA caps leak on notifier init failure Prathamesh Deshpande
2026-04-15  8:26 ` Cosmin Ratiu [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=314cbe51501c36fc8a44bebe8ec7dac068aa1f3b.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=cjubran@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=prathameshdeshpande7@gmail.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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