diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index db83530184f81ae676a0beb8a053e1ee7dc07858..7298e696c6cf9a7c5df105828b23a8041029e607 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c @@ -414,8 +414,15 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag) * might have only partially setup the connection. */ if (iser_conn) { + mutex_lock(&iser_conn->state_mutex); + iser_conn_terminate(iser_conn); + + /* unbind */ + iser_conn->iscsi_conn = NULL; conn->dd_data = NULL; + complete(&iser_conn->stop_completion); + mutex_unlock(&iser_conn->state_mutex); } }