FAILED: patch "[PATCH] iscsi-target: Fix panic when adding second TCP connection to" failed to apply to 3.14-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 3.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
8abc718de6e9e52d8a6bfdb735060554aeae25e4Mon Sep 17 00:00:00 2001
From: Feng Li <[email protected]>
Date: Tue, 12 Jul 2016 06:15:44 +0800
Subject: [PATCH] iscsi-target: Fix panic when adding second TCP connection to
iSCSI session
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.
drivers/target/iscsi/iscsi_target_login.c +3 -2
@@ -1371,8 +1371,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) } login->zero_tsih = zero_tsih; - conn->sess->se_sess->sup_prot_ops = - conn->conn_transport->iscsit_get_sup_prot_ops (conn); +if (conn->sess) + conn->sess->se_sess->sup_prot_ops = + conn->conn_transport->iscsit_get_sup_prot_ops (conn); tpg = conn->tpg;if (!tpg) {