linux-hardened/drivers/infiniband
Hariprasad S 944661dd97 RDMA/iw_cxgb4: atomically lookup ep and get a reference
There is a race between ULP threads calling c4iw_ep_disconnect() via
c4iw_modify_rc_qp() and the ingress CPL thread where the ULP thread
can free the endpoint just after the ingress CPL thread finds the ep
pointer in the tid table.  To avoid this, we now use the hwtid_idr table
for lookups instead of the LLD tid table so we can lock around insert,
remove, and lookup+get_ep to avoid the race.  The CPL handlers now will
either find the ep ptr and have a ref on it, or not find it and they
can discard the CPL.  Callers of get_ep_from_tid() will have a ref
on the ep if found, and thus must deref when they are done.
Negative advice in peer_abort_intr() need to dereference the ep.
therefore peer_abort() is scheduled to dereference the ep later.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-05-13 19:38:08 -04:00
..
core IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
hw RDMA/iw_cxgb4: atomically lookup ep and get a reference 2016-05-13 19:38:08 -04:00
sw IB/hfi1: Use global defines for upper bits in opcode 2016-04-28 16:32:28 -04:00
ulp IB/srp: Move common code into the caller 2016-05-12 14:18:57 -04:00
Kconfig Merge branches 'i40iw', 'sriov' and 'hfi1' into k.o/for-4.6 2016-03-21 17:32:23 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00