All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Maor Gottlieb <maorg@nvidia.com>
Cc: linux-rdma <linux-rdma@vger.kernel.org>
Subject: Re: f0ae4afe3d35 ("RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow")
Date: Sun, 19 Dec 2021 18:19:09 +0000	[thread overview]
Message-ID: <C479500E-BED6-4ED6-9C4D-510D6AAE11D1@oracle.com> (raw)
In-Reply-To: <3fa317ce-e0cf-cfce-c4f2-8940ba546b61@nvidia.com>

Hello Maor-

> On Dec 19, 2021, at 4:51 AM, Maor Gottlieb <maorg@nvidia.com> wrote:
> 
> 
> On 12/18/2021 11:25 PM, Chuck Lever III wrote:
>> NFS/RDMA with an NFS client using mlx5-based hardware triggers a
>> system deadlock (no error messages) on the client. I bisected to
>> f0ae4afe3d35 ("RDMA/mlx5: Fix releasing unallocated memory in
>> dereg MR flow").
>> 
>> --
>> Chuck Lever
> 
> Hi Chuck,
> 
> I found some bug in the cited commit. Can you please test if the below patch fixes this deadlock ?
> 
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index 157d862fb864..3cb4e34fe199 100644
> --- a/drivers/infiniband/hw/mlx5/mr.c
> +++ b/drivers/infiniband/hw/mlx5/mr.c
> @@ -1978,7 +1978,7 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
>                         return rc;
>         }
> 
> -   if (mr->umem) {
> + if (udata && mr->umem) {
>                 bool is_odp = is_odp_mr(mr);
> 
>                 if (!is_odp)

After applying this one-liner, I am not able to reproduce the
NFS client system deadlock.

Tested-by: Chuck Lever <chuck.lever@oracle.com>

--
Chuck Lever




      reply	other threads:[~2021-12-19 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 21:25 f0ae4afe3d35 ("RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow") Chuck Lever III
2021-12-19  8:57 ` Leon Romanovsky
2021-12-19  9:51 ` Maor Gottlieb
2021-12-19 18:19   ` Chuck Lever III [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=C479500E-BED6-4ED6-9C4D-510D6AAE11D1@oracle.com \
    --to=chuck.lever@oracle.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.