WSL2-Linux-Kernel/drivers/infiniband/core
Jason Gunthorpe 071ba4cc55 RDMA: Add rdma_connect_locked()
There are two flows for handling RDMA_CM_EVENT_ROUTE_RESOLVED, either the
handler triggers a completion and another thread does rdma_connect() or
the handler directly calls rdma_connect().

In all cases rdma_connect() needs to hold the handler_mutex, but when
handler's are invoked this is already held by the core code. This causes
ULPs using the 2nd method to deadlock.

Provide a rdma_connect_locked() and have all ULPs call it from their
handlers.

Link: https://lore.kernel.org/r/0-v2-53c22d5c1405+33-rdma_connect_locking_jgg@nvidia.com
Reported-and-tested-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Fixes: 2a7cec5381 ("RDMA/cma: Fix locking for the RDMA_CM_CONNECT state")
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-10-28 09:14:49 -03:00
..
Makefile
addr.c
agent.c
agent.h
cache.c RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
cgroup.c
cm.c
cm_msgs.h
cm_trace.c
cm_trace.h
cma.c RDMA: Add rdma_connect_locked() 2020-10-28 09:14:49 -03:00
cma_configfs.c
cma_priv.h
cma_trace.c
cma_trace.h
core_priv.h
counters.c
cq.c
device.c RDMA: Explicitly pass in the dma_device to ib_register_device 2020-10-16 13:53:46 -03:00
ib_core_uverbs.c
iwcm.c
iwcm.h
iwpm_msg.c
iwpm_util.c
iwpm_util.h
lag.c
mad.c
mad_priv.h
mad_rmpp.c
mad_rmpp.h
mr_pool.c
multicast.c
netlink.c
nldev.c
opa_smi.h
packer.c
rdma_core.c
rdma_core.h
restrack.c
restrack.h
roce_gid_mgmt.c
rw.c
sa.h
sa_query.c
security.c
smi.c
smi.h
sysfs.c
trace.c
ucma.c RDMA/ucma: Fix use after free in destroy id flow 2020-10-16 14:07:08 -03:00
ud_header.c
umem.c Merge branch 'dynamic_sg' into rdma.git for-next 2020-10-16 12:40:58 -03:00
umem_odp.c
user_mad.c
uverbs.h
uverbs_cmd.c
uverbs_ioctl.c
uverbs_main.c RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
uverbs_marshall.c
uverbs_std_types.c
uverbs_std_types_async_fd.c
uverbs_std_types_counters.c
uverbs_std_types_cq.c
uverbs_std_types_device.c RDMA/uverbs: Fix false error in query gid IOCTL 2020-10-26 19:29:26 -03:00
uverbs_std_types_dm.c
uverbs_std_types_flow_action.c
uverbs_std_types_mr.c
uverbs_std_types_qp.c
uverbs_std_types_srq.c
uverbs_std_types_wq.c
uverbs_uapi.c
verbs.c