Handle the case where QP is destroyed before
disconnect processing. Windows supports
reinit_qp during a disconnect call by
destroying the QP and recreating the
QO instead of state change from reset
to init. Call disconnect in destroy
CM code to handle this unexpected state.

Signed-off-by: Arlin Davis <arlin.r.da...@intel.com>
---
 dapl/openib_scm/cm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 5708214..9713641 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -283,6 +283,9 @@ void dapls_ib_cm_free(dp_ib_cm_handle_t cm_ptr, DAPL_EP *ep)
                return;
        }
 
+       /* free could be called before disconnect */
+       dapli_socket_disconnect(cm_ptr);
+
        dapl_os_lock(&cm_ptr->lock);
        cm_ptr->state = DCM_DESTROY;
        if ((cm_ptr->ep) && (cm_ptr->ep->cm_handle == cm_ptr)) {
-- 
1.5.2.5

_______________________________________________
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to