mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
iscsi-target: Fix panic when adding second TCP connection to iSCSI session
commit 8abc718de6 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: Feng Li <lifeng1519@gmail.com>
Tested-by: Sumit Rai <sumit.rai@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -1357,6 +1357,7 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
|||||||
}
|
}
|
||||||
login->zero_tsih = zero_tsih;
|
login->zero_tsih = zero_tsih;
|
||||||
|
|
||||||
|
if (conn->sess)
|
||||||
conn->sess->se_sess->sup_prot_ops =
|
conn->sess->se_sess->sup_prot_ops =
|
||||||
conn->conn_transport->iscsit_get_sup_prot_ops(conn);
|
conn->conn_transport->iscsit_get_sup_prot_ops(conn);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user