From: Arlin Davis Date: Tue, 21 May 2013 21:11:07 +0000 (-0700) Subject: mcm: segfault with counters, no CM object when not found and duplicate case X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1be8974f926fa816c9bcbb39a6be73fadf4944a0;p=~ardavis%2Fdapl.git mcm: segfault with counters, no CM object when not found and duplicate case Signed-off-by: Arlin Davis --- diff --git a/dapl/openib_mcm/cm.c b/dapl/openib_mcm/cm.c index d5af2a3..022d132 100644 --- a/dapl/openib_mcm/cm.c +++ b/dapl/openib_mcm/cm.c @@ -480,7 +480,6 @@ retry_listenq: break; } else { /* duplicate; bail and throw away */ - dapl_os_unlock(lock); dapl_log(DAPL_DBG_TYPE_CM_WARN, " DUPLICATE: cm %p op %s (%s) st %s" " [lid, port, cqp, iqp]:" @@ -498,14 +497,15 @@ retry_listenq: ntohs(cm->msg.saddr.lid), ntohs(cm->msg.sport), ntohl(cm->msg.sqpn), ntohl(cm->msg.saddr.qpn)); - DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_REQ_DUP); + DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), + DCNT_IA_CM_ERR_REQ_DUP); - return NULL; + dapl_os_unlock(lock); + return NULL; } } } dapl_os_unlock(lock); - /* no duplicate request on connq, check listenq for new request */ if (ntohs(msg->op) == MCM_REQ && !listenq && !found) { listenq = 1; @@ -541,7 +541,7 @@ retry_listenq: ntohl(msg->d_id)); if (ntohs(msg->op) == MCM_DREP) { - DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&cm->hca->ia_list_head)), DCNT_IA_CM_ERR_DREP_DUP); + DAPL_CNTR(((DAPL_IA *)dapl_llist_peek_head(&tp->hca->ia_list_head)), DCNT_IA_CM_ERR_DREP_DUP); } }