Whamcloud - gitweb
LU-7210 o2iblnd: take extra refcount in kiblnd_connreq_done 27/17527/4
authorLiang Zhen <liang.zhen@intel.com>
Wed, 9 Dec 2015 14:27:05 +0000 (22:27 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 5 Jan 2016 00:49:12 +0000 (00:49 +0000)
commit2f033b088745bb98eeeed33c58518fddd16397db
tree87cd9bec95780825e182cd4dd4ed026443855657
parentb4d4a448b2ed93a8bc73db81bbf9c8ba08250e3a
LU-7210 o2iblnd: take extra refcount in kiblnd_connreq_done

refcount taken by cmid is not reliable after kiblnd_connreq_done
released the glock because this connection is visible to other
threads, another thread can find and close this connection right
after kiblnd_connreq_done released the glock, if kiblnd_cm_callback
for RDMA_CM_EVENT_DISCONNECTED is called, it can release the
connection refcount taken by cmid. It means the connection could be
destroyed before kiblnd_connreq_done() finish operations on it.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Ic49b63551c13abc8c874732de5fd4ea5cef4c6b7
Reviewed-on: http://review.whamcloud.com/17527
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd_cb.c