From 0a58b56108e9582966717069bb2948fff26f9c28 Mon Sep 17 00:00:00 2001 From: eeb Date: Thu, 3 Mar 2005 12:11:18 +0000 Subject: [PATCH] * fix for 5722 openibnal: NULL dereference in kibnal_close_conn_locked --- lnet/klnds/openiblnd/openiblnd_cb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lnet/klnds/openiblnd/openiblnd_cb.c b/lnet/klnds/openiblnd/openiblnd_cb.c index 3238b0e..c2929ba 100644 --- a/lnet/klnds/openiblnd/openiblnd_cb.c +++ b/lnet/klnds/openiblnd/openiblnd_cb.c @@ -1617,8 +1617,6 @@ kibnal_connreq_done (kib_conn_t *conn, int active, int status) if (status == 0) { /* connection established... */ LASSERT (state == IBNAL_CONN_CONNECTING); - conn->ibc_state = IBNAL_CONN_ESTABLISHED; - if (!kibnal_peer_active(peer)) { /* ...but peer deleted meantime */ status = -ECONNABORTED; @@ -1632,6 +1630,7 @@ kibnal_connreq_done (kib_conn_t *conn, int active, int status) /* Everything worked! */ peer->ibp_connecting--; + conn->ibc_state = IBNAL_CONN_ESTABLISHED; /* +1 ref for ibc_list; caller(== CM)'s ref remains until * the IB_CM_IDLE callback */ -- 1.8.3.1