Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: Selvin Xavier <selvin.xavier@broadcom.com>,
	Kalesh AP <kalesh-anakkur.purayil@broadcom.com>,
	Leon Romanovsky <leon@kernel.org>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA/bnxt_re: check debugfs parameter allocation
Date: Wed, 10 Jun 2026 14:25:55 -0300	[thread overview]
Message-ID: <20260610172555.GA1003802@nvidia.com> (raw)
In-Reply-To: <20260606040644.13-1-ruoyuw560@gmail.com>

On Sat, Jun 06, 2026 at 12:06:44PM +0800, Ruoyu Wang wrote:
> bnxt_re_debugfs_add_pdev() allocates per-file private data for the CC
> configuration debugfs entries. The loop that initializes those entries
> uses rdev->cc_config_params immediately, so allocation failure would lead
> to NULL pointer dereferences while setting up debugfs.
> 
> Debugfs is best-effort. If the CC configuration private data cannot be
> allocated, skip those entries and continue with the independent CQ
> coalescing debugfs setup.
> 
> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
> ---
>  drivers/infiniband/hw/bnxt_re/debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied though

>  	rdev->cc_config_params = kzalloc_obj(*cc_params);
> +	if (!rdev->cc_config_params)
> +		goto init_cq_coal;

I changed this to just return, there is no point in continuing to
setup as the machine is probably dead if this fails.

Thanks,
Jason

      reply	other threads:[~2026-06-10 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-06  4:06 [PATCH] RDMA/bnxt_re: check debugfs parameter allocation Ruoyu Wang
2026-06-10 17:25 ` Jason Gunthorpe [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=20260610172555.GA1003802@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ruoyuw560@gmail.com \
    --cc=selvin.xavier@broadcom.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