]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0f9da052ba887bdc6221c0b40f1e773f144ffa4f
treebc99d51ce1c3419ea9e559e4f7428e0f811a4191
parentdb696121bb2013e7c6183b9c2aa7a8256f88d88b
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