Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Doug Ledford <dledford@redhat.com>,
	Jack Morgenstein <jackm@dev.mellanox.co.il>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc] IB/core: Fix potential NULL pointer dereference in pkey cache
Date: Tue, 5 May 2020 09:56:01 +0300	[thread overview]
Message-ID: <20200505065601.GH111287@unreal> (raw)
In-Reply-To: <20200504175829.GA20458@ziepe.ca>

On Mon, May 04, 2020 at 02:58:29PM -0300, Jason Gunthorpe wrote:
> On Sun, Apr 26, 2020 at 10:58:11AM +0300, Leon Romanovsky wrote:
> > From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> >
> > The IB core pkey cache is populated by procedure ib_cache_update().
> > Initially, the pkey cache pointer is NULL. ib_cache_update allocates
> > a buffer and populates it with the device's pkeys, via repeated calls
> > to procedure ib_query_pkey().
> >
> > If there is a failure in populating the pkey buffer via ib_query_pkey(),
> > ib_cache_update does not replace the old pkey buffer cache with the
> > updated one -- it leaves the old cache as is.
>
> The bug described here is that ib_cache_setup_one() ignores the return
> codes from ib_cache_update()
>
> Device registration should fail if the cache could not be loaded, just
> fix ib_cache_setup_one()

Thanks, it is much easy fix.

>
> Jason

      reply	other threads:[~2020-05-05  6:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26  7:58 [PATCH rdma-rc] IB/core: Fix potential NULL pointer dereference in pkey cache Leon Romanovsky
2020-05-04 17:58 ` Jason Gunthorpe
2020-05-05  6:56   ` Leon Romanovsky [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=20200505065601.GH111287@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jackm@dev.mellanox.co.il \
    --cc=jgg@ziepe.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox