]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
common: dat_evd_free seg faults with resized software EVD
authorArlin Davis <arlin.r.davis@intel.com>
Fri, 28 Oct 2011 19:27:16 +0000 (12:27 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Fri, 28 Oct 2011 19:27:16 +0000 (12:27 -0700)
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@intel.com>
dapl/common/dapl_evd_resize.c

index 762fad428f814cada1bdb8fd102d0ff08ae2e801..f36270c2fc51f046bdf75b67f6974b328d81a570 100644 (file)
@@ -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);