Whamcloud - gitweb
LU-6261 gnilnd: kgnilnd_check_rdma_cq race in error path. 39/15439/3
authorChris Horn <hornc@cray.com>
Mon, 27 Jul 2015 13:59:57 +0000 (09:59 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 31 Jul 2015 01:33:11 +0000 (01:33 +0000)
commita12e5832df9338edbd37f239ce77b487933a1007
tree7a28692a3293dc4d9bd6fce2e94f70f89bf9845b
parentc6b0d0e779c18809d1ef9a6e352349107c7e68d8
LU-6261 gnilnd: kgnilnd_check_rdma_cq race in error path.

It is possible for multiple threads to both be processing a
transaction error that causes the connection to close.
If the close path stalls after changing the conn state to CLOSING,
the tx_done path will put a tx in purgatory since the conn state is
not ESTABLISHED anymore. When the close path continues, it expects to
find that the conn->gnc_mdd_list is empty and assert if it isn't
empty.
Change the error code for the tx_done path so that we don't put this
tx in purgatory since we are closing the connection anyway.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I4458522f16508eb53d380f62320c65c7bf84657a
Reviewed-on: http://review.whamcloud.com/15439
Tested-by: Jenkins
Reviewed-by: James Shimek <jshimek@cray.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd.c
lnet/klnds/gnilnd/gnilnd.h
lnet/klnds/gnilnd/gnilnd_api_wrap.h
lnet/klnds/gnilnd/gnilnd_cb.c