[ofw] [PATCH] uDAPL v2 - common: seg fault in dapl_evd_wait with multi-thread application using CNO's

Davis, Arlin R arlin.r.davis at intel.com
Wed Nov 18 16:22:31 PST 2009


if dealing with event streams besides a CQ event stream,
be conservative and set producer side locking.  Otherwise, no.
Check for CNO is missing, CNO is not considered CQ event stream.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 dapl/common/dapl_evd_util.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dapl/common/dapl_evd_util.c b/dapl/common/dapl_evd_util.c
index 02909e9..cc0aa17 100644
--- a/dapl/common/dapl_evd_util.c
+++ b/dapl/common/dapl_evd_util.c
@@ -159,9 +159,11 @@ dapls_evd_internal_create(DAPL_IA * ia_ptr,
 	/*
 	 * If we are dealing with event streams besides a CQ event stream,
 	 * be conservative and set producer side locking.  Otherwise, no.
+	 * Note: CNO is not considered CQ event stream.
 	 */
 	evd_ptr->evd_producer_locking_needed =
-	    !(evd_flags & (DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG));
+	    (!(evd_flags & (DAT_EVD_DTO_FLAG | DAT_EVD_RMR_BIND_FLAG)) ||
+	     evd_ptr->cno_ptr);
 
 	/* Before we setup any callbacks, transition state to OPEN.  */
 	evd_ptr->evd_state = DAPL_EVD_STATE_OPEN;
@@ -646,8 +648,9 @@ dapli_evd_post_event(IN DAPL_EVD * evd_ptr, IN const DAT_EVENT * event_ptr)
 	DAT_RETURN dat_status;
 	DAPL_CNO *cno_to_trigger = NULL;
 
-	dapl_dbg_log(DAPL_DBG_TYPE_EVD, "%s: Called with event %s\n",
-		     __FUNCTION__, dapl_event_str(event_ptr->event_number));
+	dapl_dbg_log(DAPL_DBG_TYPE_EVD, "%s: %s evd %p state %d\n",
+		     __FUNCTION__, dapl_event_str(event_ptr->event_number), 
+		     evd_ptr, evd_ptr->evd_state);
 
 	dat_status = dapls_rbuf_add(&evd_ptr->pending_event_queue,
 				    (void *)event_ptr);
-- 
1.5.2.5




More information about the ofw mailing list