mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
RDMA/ucma: Add missing locking around rdma_leave_multicast()
[ Upstream commit38e03d0926] All entry points to the rdma_cm from a ULP must be single threaded, even this error unwinds. Add the missing locking. Fixes:7c11910783("RDMA/ucma: Put a lock around every call to the rdma_cm layer") Link: https://lore.kernel.org/r/20200818120526.702120-11-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c62998f154
commit
0beef934d5
@@ -1476,7 +1476,9 @@ static ssize_t ucma_process_join(struct ucma_file *file,
|
||||
return 0;
|
||||
|
||||
err3:
|
||||
mutex_lock(&ctx->mutex);
|
||||
rdma_leave_multicast(ctx->cm_id, (struct sockaddr *) &mc->addr);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_cleanup_mc_events(mc);
|
||||
err2:
|
||||
mutex_lock(&mut);
|
||||
|
||||
Reference in New Issue
Block a user