From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
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: Tue, 8 Dec 2020 07:42:35 +0200 [thread overview]
Message-ID: <20201208054235.GA4430@unreal> (raw)
In-Reply-To: <20201207200306.GA1790347@nvidia.com>
On Mon, Dec 07, 2020 at 04:03:06PM -0400, Jason Gunthorpe wrote:
> 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
Thanks, this is why I sent it to the -next branch.
>
> Jason
prev parent reply other threads:[~2020-12-08 5:43 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
2020-12-08 5:42 ` 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=20201208054235.GA4430@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=lariel@mellanox.com \
--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.