linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lu <tonylu@linux.alibaba.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	Maor Gottlieb <maorg@nvidia.com>, Alaa Hleihel <alaa@nvidia.com>,
	Chuck Lever <chuck.lever@oracle.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-rc] RDMA/mlx5: Fix dereg mr flow for kernel MRs
Date: Wed, 22 Dec 2021 10:51:58 +0800	[thread overview]
Message-ID: <YcKSzszT/zw2ECjh@TonyMac-Alibaba> (raw)
In-Reply-To: <f298db4ec5fdf7a2d1d166ca2f66020fd9397e5c.1640079962.git.leonro@nvidia.com>

On Tue, Dec 21, 2021 at 11:46:41AM +0200, Leon Romanovsky wrote:
> From: Maor Gottlieb <maorg@nvidia.com>
> 
> The cited commit moved umem into the union, hence
> umem could be accessed only for user MRs. Add udata check
> before access umem in the dereg flow.
> 
> Fixes: f0ae4afe3d35 ("RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow")
> Tested-by: Chuck Lever <chuck.lever@oracle.com>
> Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +-
>  drivers/infiniband/hw/mlx5/mr.c      | 4 ++--
>  drivers/infiniband/hw/mlx5/odp.c     | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h

This patch was tested and works for me in our environment for SMC. It
wouldn't panic when release link and call ib_dereg_mr.

Tested-by: Tony Lu <tonylu@linux.alibaba.com>

Thanks,
Tony Lu

  reply	other threads:[~2021-12-22  2:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  9:46 [PATCH rdma-rc] RDMA/mlx5: Fix dereg mr flow for kernel MRs Leon Romanovsky
2021-12-22  2:51 ` Tony Lu [this message]
2022-01-03  9:51   ` Leon Romanovsky
2022-01-03 13:15     ` Thorsten Leemhuis
2022-01-03 18:26       ` Leon Romanovsky
2022-01-04  0:08         ` Jason Gunthorpe
2022-01-04 10:29         ` Thorsten Leemhuis

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=YcKSzszT/zw2ECjh@TonyMac-Alibaba \
    --to=tonylu@linux.alibaba.com \
    --cc=alaa@nvidia.com \
    --cc=chuck.lever@oracle.com \
    --cc=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).