Re: f0ae4afe3d35 ("RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow")

From
Chuck Lever III <hidden>
Date
2021-12-19 18:19:16
Reply to
Maor Gottlieb, 2021-12-19
Hello Maor-
quoted hunk ↗ jump to hunk
On Dec 19, 2021, at 4:51 AM, Maor Gottlieb [off-list ref] wrote:


On 12/18/2021 11:25 PM, Chuck Lever III wrote:
quoted
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 <redacted>

--
Chuck Lever


Thread (4 messages) 4 messages, 3 authors, last reply 2021-12-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help