From patchwork Thu Nov 19 00:22:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 61216 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAJ0MVA8008828 for ; Thu, 19 Nov 2009 00:22:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756001AbZKSAW0 (ORCPT ); Wed, 18 Nov 2009 19:22:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756061AbZKSAW0 (ORCPT ); Wed, 18 Nov 2009 19:22:26 -0500 Received: from mga01.intel.com ([192.55.52.88]:15930 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756001AbZKSAW0 convert rfc822-to-8bit (ORCPT ); Wed, 18 Nov 2009 19:22:26 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 18 Nov 2009 16:17:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,767,1249282800"; d="scan'208";a="748346767" Received: from orsmsx601.amr.corp.intel.com ([10.22.226.213]) by fmsmga001.fm.intel.com with ESMTP; 18 Nov 2009 16:28:58 -0800 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx601.amr.corp.intel.com ([10.22.226.213]) with mapi; Wed, 18 Nov 2009 16:22:32 -0800 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" , "ofw@lists.openfabrics.org" CC: "Smith, Stan" Date: Wed, 18 Nov 2009 16:22:31 -0800 Subject: [PATCH] uDAPL v2 - common: seg fault in dapl_evd_wait with multi-thread application using CNO's Thread-Topic: [PATCH] uDAPL v2 - common: seg fault in dapl_evd_wait with multi-thread application using CNO's Thread-Index: AcpormJ3H3FqMXB9TR+OZQAR2LTEpg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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);