@@ -1026,23 +1026,26 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
1026
1026
}
1027
1027
}
1028
1028
1029
- static noinline void cm_destroy_id_wait_timeout (struct ib_cm_id * cm_id )
1029
+ static noinline void cm_destroy_id_wait_timeout (struct ib_cm_id * cm_id ,
1030
+ enum ib_cm_state old_state )
1030
1031
{
1031
1032
struct cm_id_private * cm_id_priv ;
1032
1033
1033
1034
cm_id_priv = container_of (cm_id , struct cm_id_private , id );
1034
- pr_err ("%s: cm_id=%p timed out. state=%d refcnt=%d\n" , __func__ ,
1035
- cm_id , cm_id -> state , refcount_read (& cm_id_priv -> refcount ));
1035
+ pr_err ("%s: cm_id=%p timed out. state %d -> %d, refcnt=%d\n" , __func__ ,
1036
+ cm_id , old_state , cm_id -> state , refcount_read (& cm_id_priv -> refcount ));
1036
1037
}
1037
1038
1038
1039
static void cm_destroy_id (struct ib_cm_id * cm_id , int err )
1039
1040
{
1040
1041
struct cm_id_private * cm_id_priv ;
1042
+ enum ib_cm_state old_state ;
1041
1043
struct cm_work * work ;
1042
1044
int ret ;
1043
1045
1044
1046
cm_id_priv = container_of (cm_id , struct cm_id_private , id );
1045
1047
spin_lock_irq (& cm_id_priv -> lock );
1048
+ old_state = cm_id -> state ;
1046
1049
retest :
1047
1050
switch (cm_id -> state ) {
1048
1051
case IB_CM_LISTEN :
@@ -1151,7 +1154,7 @@ static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
1151
1154
msecs_to_jiffies (
1152
1155
CM_DESTROY_ID_WAIT_TIMEOUT ));
1153
1156
if (!ret ) /* timeout happened */
1154
- cm_destroy_id_wait_timeout (cm_id );
1157
+ cm_destroy_id_wait_timeout (cm_id , old_state );
1155
1158
} while (!ret );
1156
1159
1157
1160
while ((work = cm_dequeue_work (cm_id_priv )) != NULL )
0 commit comments