Message ID | 80f2fcd19952dfa7d9981d93fd6359b4471f8278.1739186929.git.leon@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [rdma-rc] RDMA/mlx5: Fix implicit ODP hang on parent deregistration | expand |
On Mon, 10 Feb 2025 13:31:11 +0200, Leon Romanovsky wrote: > Fix the destroy_unused_implicit_child_mr() to prevent hanging during > parent deregistration as of below [1]. > > Upon entering destroy_unused_implicit_child_mr(), the reference count > for the implicit MR parent is incremented using: > refcount_inc_not_zero(). > > [...] Applied, thanks! [1/1] RDMA/mlx5: Fix implicit ODP hang on parent deregistration https://git.kernel.org/rdma/rdma/c/3e2ced4fcbbdfe Best regards,
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index 89057faf3bf4..a1f80e03c5d2 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -254,6 +254,7 @@ static void destroy_unused_implicit_child_mr(struct mlx5_ib_mr *mr) if (__xa_cmpxchg(&imr->implicit_children, idx, mr, NULL, GFP_KERNEL) != mr) { xa_unlock(&imr->implicit_children); + mlx5r_deref_odp_mkey(&imr->mmkey); return; }