[ofw] [PATCH] DAPL v2.0: common: dat_evd_free seg faults with resized software EVD

Davis, Arlin R arlin.r.davis at intel.com
Mon Oct 31 13:53:43 PDT 2011


dapl_evd_resize is attempting to resize a CQ but there is no
CQ attached to a software EVD. Add check for cq_handle
before resizing.

Signed-off-by: Arlin Davis <arlin.r.davis at intel.com>
---
 dapl/common/dapl_evd_resize.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/dapl/common/dapl_evd_resize.c b/dapl/common/dapl_evd_resize.c
index 762fad4..f36270c 100644
--- a/dapl/common/dapl_evd_resize.c
+++ b/dapl/common/dapl_evd_resize.c
@@ -108,11 +108,14 @@ DAT_RETURN DAT_API dapl_evd_resize(IN DAT_EVD_HANDLE evd_handle,
 		goto bail;
 	}
 
-	dat_status = dapls_ib_cq_resize(evd_ptr->header.owner_ia,
-					evd_ptr, &evd_qlen);
-	if (dat_status != DAT_SUCCESS) {
-		dapl_os_unlock(&evd_ptr->header.lock);
-		goto bail;
+	if (evd_ptr->ib_cq_handle) {
+
+		dat_status = dapls_ib_cq_resize(evd_ptr->header.owner_ia,
+						evd_ptr, &evd_qlen);
+		if (dat_status != DAT_SUCCESS) {
+			dapl_os_unlock(&evd_ptr->header.lock);
+			goto bail;
+		}
 	}
 
 	dat_status = dapls_evd_event_realloc(evd_ptr, evd_qlen);
-- 
1.7.3





More information about the ofw mailing list