Thread (1 message) 1 message, 1 author, 2016-08-18
DORMANTno replies REVIEWED: 1 (0M)

1 review trailer.

[PATCH 4.7 164/186] iscsi-target: Fix panic when adding second TCP connection to iSCSI session

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2016-08-18 14:16:30
Also in: lkml

4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Feng Li <redacted>

commit 8abc718de6e9e52d8a6bfdb735060554aeae25e4 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 <redacted>
Tested-by: Sumit Rai <redacted>
Signed-off-by: Nicholas Bellinger <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/target/iscsi/iscsi_target_login.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1371,8 +1371,9 @@ static int __iscsi_target_login_thread(s
 	}
 	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) {

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help