RDMA/iw_cxgb4: atomic find and reference for listening endpoints
authorHariprasad S <hariprasad@chelsio.com>
Fri, 6 May 2016 16:48:07 +0000 (22:18 +0530)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:38:09 +0000 (19:38 -0400)
commitf86fac79afecb41682886785364b15cb13f22280
treebc99d51ce1c3419ea9e559e4f7428e0f811a4191
parente8667a9b35c550e3daf4519058a52252bf41d9db
RDMA/iw_cxgb4: atomic find and reference for listening endpoints

Add get_ep_from_stid() which will atomically find and reference the
endpoint struct if found. This avoids touch-after-free races between
threads destroying listening endpoints and the CPL processing thread
processing an incoming PASS_ACCEPT_REQ CPL.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c