From 60191c862bb7a7d49a962751ce20016572a5acb8 Mon Sep 17 00:00:00 2001 From: sleybo Date: Tue, 28 Nov 2006 07:21:02 +0000 Subject: [PATCH] [IPOIB] move the adapter state to active only if the old state is init. To prevent the following race: The adapter start destruction and set the adapter->p_port to NULL. And bcast_cb set the port to active and use p_adapter->p_port git-svn-id: svn://openib.tc.cornell.edu/gen1@549 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/ulp/ipoib/kernel/ipoib_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/ulp/ipoib/kernel/ipoib_adapter.c b/trunk/ulp/ipoib/kernel/ipoib_adapter.c index d31380e3..6b1e0b00 100644 --- a/trunk/ulp/ipoib/kernel/ipoib_adapter.c +++ b/trunk/ulp/ipoib/kernel/ipoib_adapter.c @@ -951,7 +951,7 @@ ipoib_set_active( old_state = p_adapter->state; /* Change the state to indicate that we are now connected and live. */ - if( old_state != IB_PNP_PORT_REMOVE ) + if( old_state == IB_PNP_PORT_INIT ) p_adapter->state = IB_PNP_PORT_ACTIVE; cl_obj_unlock( &p_adapter->obj ); -- 2.41.0