From: ftillier Date: Tue, 29 Aug 2006 20:46:19 +0000 (+0000) Subject: [IBAL] CM: Fix error handling if __insert_cep fails. X-Git-Url: http://git.etherboot.org/mirror/winof/.git/commitdiff_plain/448abbf04e288236d5687f1b534f83a5496c238d [IBAL] CM: Fix error handling if __insert_cep fails. git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@467 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/core/al/kernel/al_cm_cep.c b/core/al/kernel/al_cm_cep.c index d627dbb3..15707186 100644 --- a/core/al/kernel/al_cm_cep.c +++ b/core/al/kernel/al_cm_cep.c @@ -1433,12 +1433,6 @@ __rep_handler( /* Roll back the state change. */ __reject_mad( p_port_cep, p_cep, p_mad, IB_REJ_STALE_CONN ); p_cep->state = old_state; - /* - * Clear the remote QPN and comm ID so that we don't try - * to remove the CEP from those maps. - */ - p_cep->remote_qpn = 0; - p_cep->remote_comm_id = 0; status = __process_stale( p_cep ); } else @@ -2802,17 +2796,22 @@ __insert_cep( p_cep = __insert_by_qpn( p_new_cep ); if( p_cep != p_new_cep ) - goto done; + goto err; p_cep = __insert_by_id( p_new_cep ); if( p_cep != p_new_cep ) { cl_rbmap_remove_item( &gp_cep_mgr->conn_qp_map, &p_new_cep->rem_qp_item ); - p_cep->remote_qpn = 0; +err: + /* + * Clear the remote QPN and comm ID so that we don't try + * to remove the CEP from those maps. + */ + p_new_cep->remote_qpn = 0; + p_new_cep->remote_comm_id = 0; } -done: AL_EXIT( AL_DBG_CM ); return p_cep; }