target: Fix delayed Task Aborted Status (TAS) handling bug
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Nov 2013 22:39:14 +0000 (14:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:37 +0000 (11:05 -0800)
commit2db811c4fe4f4e97079591ce46dfa5f78bfb3128
tree831e61993f1acd113cba6abe9eda496832faebdc
parentba104050017de2e08c347d66f3399ea2e17bfb17
target: Fix delayed Task Aborted Status (TAS) handling bug

commit 29f4c090079f442ea2723d292e4e64f0b6ac1f27 upstream.

This patch fixes a bug in delayed Task Aborted Status (TAS) handling,
where transport_send_task_abort() was not returning for the case
when the se_tfo->write_pending() callback indicated that last fabric
specific WRITE PDU had not yet been received.

It also adds an explicit cmd->scsi_status = SAM_STAT_TASK_ABORTED
assignment within transport_check_aborted_status() to avoid the case
where se_tfo->queue_status() is called when the SAM_STAT_TASK_ABORTED
assignment + ->queue_status() in transport_send_task_abort() does not
occur once SCF_SENT_DELAYED_TAS has been set.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_transport.c