[ofa-general] [PATCH] scm: EP reference in CR should be cleared during ep_destroy

Davis, Arlin R arlin.r.davis at intel.com
Fri Jun 26 16:48:23 PDT 2009


The EP reference in the CR should be set to null
during the EP free call to insure no further
reference back to a mem freed EP.

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

diff --git a/dapl/openib_scm/dapl_ib_qp.c b/dapl/openib_scm/dapl_ib_qp.c
index 7c3c280..f943ff8 100644
--- a/dapl/openib_scm/dapl_ib_qp.c
+++ b/dapl/openib_scm/dapl_ib_qp.c
@@ -221,6 +221,7 @@ DAT_RETURN dapls_ib_qp_free(IN DAPL_IA * ia_ptr, IN DAPL_EP * ep_ptr)
 				     " qp_free CR: ep %p cr %p\n", ep_ptr, cr);
 			dapli_socket_disconnect(cr);
 			dapl_os_lock(&cr->lock);
+			cr->ep = NULL;
 			cr->state = SCM_DESTROY;
 			dapl_os_unlock(&cr->lock);
 		}
-- 
1.5.2.5




More information about the general mailing list