Commit b92d5f6b authored by Feng Li's avatar Feng Li Committed by Kamal Mostafa

iscsi-target: Fix panic when adding second TCP connection to iSCSI session

BugLink: http://bugs.launchpad.net/bugs/1615620

commit 8abc718d upstream.

In MC/S scenario, the conn->sess has been set NULL in
iscsi_login_non_zero_tsih_s1 when the second connection comes here,
then kernel panic.

The conn->sess will be assigned in iscsi_login_non_zero_tsih_s2. So
we should check whether it's NULL before calling.
Signed-off-by: default avatarFeng Li <lifeng1519@gmail.com>
Tested-by: default avatarSumit Rai <sumit.rai@calsoftinc.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 01a56be7
...@@ -1357,8 +1357,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) ...@@ -1357,8 +1357,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
} }
login->zero_tsih = zero_tsih; login->zero_tsih = zero_tsih;
conn->sess->se_sess->sup_prot_ops = if (conn->sess)
conn->conn_transport->iscsit_get_sup_prot_ops(conn); conn->sess->se_sess->sup_prot_ops =
conn->conn_transport->iscsit_get_sup_prot_ops(conn);
tpg = conn->tpg; tpg = conn->tpg;
if (!tpg) { if (!tpg) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment