[ofw] [PATCH 9/9] dapl-2.0: scm: check for hca object before signaling thread

Davis, Arlin R arlin.r.davis at intel.com
Wed May 19 11:25:27 PDT 2010


There may not be an hca object attached to cm object
when freeing during cleanup.

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

diff --git a/dapl/openib_scm/cm.c b/dapl/openib_scm/cm.c
index 975ffd5..ce0d961 100644
--- a/dapl/openib_scm/cm.c
+++ b/dapl/openib_scm/cm.c
@@ -322,7 +322,8 @@ static int dapl_select(struct dapl_fd_set *set)
 
 static void dapli_cm_thread_signal(dp_ib_cm_handle_t cm_ptr) 
 {
-	send(cm_ptr->hca->ib_trans.scm[1], "w", sizeof "w", 0);
+	if (cm_ptr->hca)
+		send(cm_ptr->hca->ib_trans.scm[1], "w", sizeof "w", 0);
 }
 
 static void dapli_cm_free(dp_ib_cm_handle_t cm_ptr) 
-- 
1.5.2.5




More information about the ofw mailing list