iscsi-target: Avoid rejecting incorrect ITT for Data-Out
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 20 Jun 2014 17:59:57 +0000 (10:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:54:13 +0000 (18:54 -0700)
commit2152a122cdec4adcfcdd123ee6ab93867b35d5b5
tree4f0cc3ce1b2b95b666d8f396b5e9ac2fa88c829c
parent69256ce37fa37dc92680579c4e4a73f15fe79d36
iscsi-target: Avoid rejecting incorrect ITT for Data-Out

commit 97c99b47ac58bacb7c09e1f47d5d184434f6b06a upstream.

This patch changes iscsit_check_dataout_hdr() to dump the incoming
Data-Out payload when the received ITT is not associated with a
WRITE, instead of calling iscsit_reject_cmd() for the non WRITE
ITT descriptor.

This addresses a bug where an initiator sending an Data-Out for
an ITT associated with a READ would end up generating a reject
for the READ, eventually resulting in list corruption.

Reported-by: Santosh Kulkarni <santosh.kulkarni@calsoftinc.com>
Reported-by: Arshad Hussain <arshad.hussain@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/iscsi/iscsi_target.c