From c616a8549db461e39feed71f0f10228313d17b90 Mon Sep 17 00:00:00 2001 From: Arlin Davis Date: Mon, 17 May 2010 16:22:30 -0700 Subject: [PATCH] scm: check for hca object before signaling thread There may not be an hca object attached to cm object when freeing during cleanup. Signed-off-by: Arlin Davis --- dapl/openib_scm/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.41.0