All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, prathameshdeshpande7@gmail.com
Subject: Re: [PATCH] IB/mlx5: Fix potential NULL dereference in query_device
Date: Tue, 31 Mar 2026 22:57:36 +0100	[thread overview]
Message-ID: <20260331215744.17039-1-prathameshdeshpande7@gmail.com> (raw)
In-Reply-To: <202603311604.GD814676@unreal>

On Tue, Mar 31, 2026 at 10:04:00PM +0300, Leon Romanovsky wrote:
> Kernel-space callers don't use uverbs path. It is solely for the
> user-space access.

Hi Leon,

Understood. Smatch flags this as an "inconsistent NULL check" because
'uhw' is explicitly checked at line 967 (if (uhw && ...)).

If 'uhw' is guaranteed to be non-NULL in this path, would you prefer
a patch removing the redundant check at line 967 instead? This would
align the logic and silence the static analysis warning.

Thanks,
Prathamesh


       reply	other threads:[~2026-03-31 21:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202603311604.GD814676@unreal>
2026-03-31 21:57 ` Prathamesh Deshpande [this message]
2026-04-09  9:51   ` [PATCH] IB/mlx5: Fix potential NULL dereference in query_device Leon Romanovsky
2026-04-10  1:07     ` Prathamesh Deshpande
2026-03-31  1:44 Prathamesh Deshpande
2026-03-31 13:49 ` Leon Romanovsky
2026-03-31 18:25   ` Prathamesh Deshpande
2026-03-31 19:04     ` Leon Romanovsky

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=20260331215744.17039-1-prathameshdeshpande7@gmail.com \
    --to=prathameshdeshpande7@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.