public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Gal Pressman <gal.pressman@linux.dev>
To: Thomas Fourier <fourier.thomas@gmail.com>
Cc: Michael Margolin <mrgolin@amazon.com>,
	Yossi Leybovich <sleybo@amazon.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	Steve Wise <larrystevenwise@gmail.com>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driver/infiniband/efa: Fix possible null pointer dereference in `efa_alloc_pd()`
Date: Tue, 13 May 2025 16:31:33 +0300	[thread overview]
Message-ID: <58e21463-6db8-4e26-b212-590453b1ddbf@linux.dev> (raw)
In-Reply-To: <20250513132252.980614-1-fourier.thomas@gmail.com>

On 13/05/2025 16:22, Thomas Fourier wrote:
> `efa_alloc_pd()` assumes that `udata` is not null but it seems like
> `__ib_alloc_pd()` in drivers/infiniband/core/verbs.c:279 can call it
> through the `ib_device` interface.  This checks if `udata` is null
> before dereferencing it.
> 
> Fixes: 40909f664d27 ("RDMA/efa: Add EFA verbs implementation")
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>

udata will never be NULL since EFA does not support kverbs, and
userspace will always pass udata.

Look at ib_device_check_mandatory().

      reply	other threads:[~2025-05-13 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13 13:22 [PATCH] driver/infiniband/efa: Fix possible null pointer dereference in `efa_alloc_pd()` Thomas Fourier
2025-05-13 13:31 ` Gal Pressman [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=58e21463-6db8-4e26-b212-590453b1ddbf@linux.dev \
    --to=gal.pressman@linux.dev \
    --cc=fourier.thomas@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=larrystevenwise@gmail.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mrgolin@amazon.com \
    --cc=shiraz.saleem@intel.com \
    --cc=sleybo@amazon.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