summaryrefslogtreecommitdiff
path: root/include/rdma/rdma_cm.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2020-08-18 15:05:16 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-08-27 08:38:14 -0300
commit620db1a1183d69cc49981ee59c9207e53befeae4 (patch)
tree3500ef6c2ff42753c83bdb08fa9c31638eba70e9 /include/rdma/rdma_cm.h
parentc07e12d8e9b4b6e532f52ecc89e52d10f3f8e8f5 (diff)
RDMA/ucma: Fix error cases around ucma_alloc_ctx()
The store to ctx->cm_id was based on the idea that _ucma_find_context() would not return the ctx until it was fully setup. Without locking this doesn't work properly. Split things so that the xarray is allocated with NULL to reserve the ID and once everything is final set the cm_id and store. Along the way this shows that the error unwind in ucma_get_event() if a new ctx is created is wrong, fix it up. Link: https://lore.kernel.org/r/20200818120526.702120-5-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'include/rdma/rdma_cm.h')
0 files changed, 0 insertions, 0 deletions