iscsi-target: Always send a response before terminating iSCSI connection
authorRoland Dreier <roland@purestorage.com>
Tue, 6 Nov 2012 02:02:42 +0000 (18:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jun 2014 19:04:20 +0000 (12:04 -0700)
commit263ee55a37e7fd03646449cbc07e16b7943f0572
treefcbac0e6062f49dcca402367af05ba47691a7542
parent437569c5bdfb172fd13d27a82c108724b674bd63
iscsi-target: Always send a response before terminating iSCSI connection

commit 1c5c12c666fda27c7c494b34934a0a0631a48130 upstream.

There are some cases, for example when the initiator sends an
out-of-bounds ErrorRecoveryLevel value, where the iSCSI target
terminates the connection without sending back any error.  Audit the
login path and add appropriate iscsit_tx_login_rsp() calls to make
sure this doesn't happen.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target_login.c
drivers/target/iscsi/iscsi_target_nego.c