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

From
Maor Gottlieb <hidden>
Date
2021-12-19 09:51:11
Reply to
Chuck Lever III, 2021-12-18
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)
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