All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
	Maor Gottlieb <maorg@nvidia.com>,
	Ariel Levkovich <lariel@mellanox.com>,
	<linux-rdma@vger.kernel.org>
Subject: Re: [PATCH rdma-next] RDMA/mlx5: Assign dev to DM MR
Date: Mon, 7 Dec 2020 16:03:06 -0400	[thread overview]
Message-ID: <20201207200306.GA1790347@nvidia.com> (raw)
In-Reply-To: <20201203190807.127189-1-leon@kernel.org>

On Thu, Dec 03, 2020 at 09:08:07PM +0200, Leon Romanovsky wrote:
> From: Maor Gottlieb <maorg@nvidia.com>
> 
> Currently, DM MR registration flow doesn't set the mlx5_ib_dev
> pointer and can cause NULL pointer dereference.
> Fix it by assign the IB device together with the other fields and
> remove unessecary reference of mlx5_ib_dev from mlx5_ib_mr.
> 
> Fixes: 6c29f57ea475 ("IB/mlx5: Device memory mr registration support")
> Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/mlx5/mlx5_ib.h  |  6 +++-
>  drivers/infiniband/hw/mlx5/mr.c       | 17 ++++++------
>  drivers/infiniband/hw/mlx5/odp.c      | 40 ++++++++++++++-------------
>  drivers/infiniband/hw/mlx5/restrack.c |  2 +-
>  4 files changed, 35 insertions(+), 30 deletions(-)

This really should be backported, an unconditional user triggerable
null pointer deref is clearly cc: stable stuff. I've added that.

This has all kinds of conflicts with the current rc branch so I'm
putting it in for-next, someone will have to make the backport

Jason

  reply	other threads:[~2020-12-07 20:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 19:08 [PATCH rdma-next] RDMA/mlx5: Assign dev to DM MR Leon Romanovsky
2020-12-07 20:03 ` Jason Gunthorpe [this message]
2020-12-08  5:42   ` 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=20201207200306.GA1790347@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=lariel@mellanox.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@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 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.