071ba4cc55
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:
|
||
---|---|---|
.. | ||
Makefile | ||
addr.c | ||
agent.c | ||
agent.h | ||
cache.c | ||
cgroup.c | ||
cm.c | ||
cm_msgs.h | ||
cm_trace.c | ||
cm_trace.h | ||
cma.c | ||
cma_configfs.c | ||
cma_priv.h | ||
cma_trace.c | ||
cma_trace.h | ||
core_priv.h | ||
counters.c | ||
cq.c | ||
device.c | ||
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 | ||
ud_header.c | ||
umem.c | ||
umem_odp.c | ||
user_mad.c | ||
uverbs.h | ||
uverbs_cmd.c | ||
uverbs_ioctl.c | ||
uverbs_main.c | ||
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 | ||
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 |