6947451 ibtl_cm_chan_open_is_aborted() panics in an error path
authorPramod Gunjikar <Pramod.Gunjikar@Sun.COM>
Sun, 02 May 2010 21:47:48 -0700
changeset 12292 4c8e89f9481c
parent 12291 bccefec6707d
child 12293 2286b8b6d071
6947451 ibtl_cm_chan_open_is_aborted() panics in an error path
usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c
--- a/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c	Tue Mar 30 10:59:13 2010 +0200
+++ b/usr/src/uts/common/io/ib/mgt/ibcm/ibcm_sm.c	Sun May 02 21:47:48 2010 -0700
@@ -3388,7 +3388,8 @@
 			ibcm_insert_trace(statep,
 			    IBCM_TRACE_CALLED_CONN_CLOSE_EVENT);
 
-			ibtl_cm_chan_open_is_aborted(statep->channel);
+			if (statep->channel)
+				ibtl_cm_chan_open_is_aborted(statep->channel);
 
 			(void) statep->cm_handler(statep->state_cm_private,
 			    &event, &ret_args, NULL, 0);
@@ -5281,7 +5282,8 @@
 
 	ibcm_path_cache_purge();
 
-	ibtl_cm_chan_open_is_aborted(statep->channel);
+	if (statep->channel)
+		ibtl_cm_chan_open_is_aborted(statep->channel);
 
 	/* Invoke CM handler w/ event passed as arg */
 	if (statep->cm_handler != NULL) {
@@ -7295,7 +7297,8 @@
 		    status);
 	}
 
-	ibtl_cm_chan_open_is_aborted(statep->channel);
+	if (statep->channel)
+		ibtl_cm_chan_open_is_aborted(statep->channel);
 
 	/* Disassociate state structure and CM */
 	IBCM_SET_CHAN_PRIVATE(statep->channel, NULL);