]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iscsi-target: Ignore ICF_GOT_LAST_DATAOUT during Data-Out ITT lookup
authorNicholas Bellinger <nab@linux-iscsi.org>
Tue, 8 Jul 2014 01:25:04 +0000 (18:25 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 15 Sep 2014 21:03:06 +0000 (14:03 -0700)
commit3687db882d8ec8f0792603ff00c2e80d791e49e8
tree1fb0e28f52e52a123aa7b11a696ee871892f773c
parent1a92e17e39b9a5d476e0a7aa52280e76321834ee
iscsi-target: Ignore ICF_GOT_LAST_DATAOUT during Data-Out ITT lookup

This patch adds a explicit check in iscsit_find_cmd_from_itt_or_dump()
to ignore commands with ICF_GOT_LAST_DATAOUT set.  This is done to
address the case where an ITT is being reused for DataOUT, but the
previous command with the same ITT has not yet been acknowledged by
ExpStatSN and removed from the per connection command list.

This issue was originally manifesting itself by referencing the
previous command during ITT lookup, and subsequently hitting the
check in iscsit_check_dataout_hdr() for ICF_GOT_LAST_DATAOUT, that
resulted in the DataOUT PDU + associated payload being silently
dumped.

Reported-by: Arshad Hussain <arshad.hussain@calsoftinc.com>
Tested-by: Arshad Hussain <arshad.hussain@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target_util.c