summaryrefslogtreecommitdiff
path: root/drivers/target
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-12-15 15:08:54 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-12-15 23:40:21 -0800
commita0b3b9b2409b409c677f7eb1e0485b816a5848f7 (patch)
treedd1161d0ab0e806b4ded4ea1e8dba4735fa4f9af /drivers/target
parent6c3c9baa0debeb4bcc52a78c4463a0a97518de10 (diff)
iscsi-target: nullify session in failed login sequence
In case login sequence failed, make sure conn->sess is NULL before calling wait_conn as some transports (iser) may rely on that (waiting for session commands). Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 18e2601527df..713c0c1877ab 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1159,6 +1159,7 @@ void iscsi_target_login_sess_out(struct iscsi_conn *conn,
}
kfree(conn->sess->sess_ops);
kfree(conn->sess);
+ conn->sess = NULL;
old_sess_out:
iscsi_stop_login_thread_timer(np);