mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
On scst teardown we call rdma_disconnect() on all connections. this moves the qps to error state and flushes all the wc, including the drain wc which will results in kref_put of the connection. In a race condition with the connection request, we might be only in the init stage of the ref, and calling kref_put will result in refcount 0 and freeing the connection while establishing it. Call the first kref_get before rdma_accept() to prevent this race. Signed-off-by: Ariel Nahum <arieln@mellanox.com> Signed-off-by: Yan Burman <yanb@mellanox.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6486 d57e44dd-8a1f-0410-8b47-8ef2f437770f