diff options
author | Nicholas Bellinger | 2013-10-02 02:04:40 +0200 |
---|---|---|
committer | Nicholas Bellinger | 2013-10-03 13:24:07 +0200 |
commit | db60df88ec39715fc3fb2a846cf35837e074c11d (patch) | |
tree | 12b29dda83448869226325fad6ea67e2882c6b0b /drivers/target/iscsi/iscsi_target_tmr.c | |
parent | target: Fix recursive COMPARE_AND_WRITE callback failure (diff) | |
download | kernel-qcow2-linux-db60df88ec39715fc3fb2a846cf35837e074c11d.tar.gz kernel-qcow2-linux-db60df88ec39715fc3fb2a846cf35837e074c11d.tar.xz kernel-qcow2-linux-db60df88ec39715fc3fb2a846cf35837e074c11d.zip |
target: Fail on non zero scsi_status in compare_and_write_callback
This patch addresses a bug for backends such as IBLOCK that perform
asynchronous completion via transport_complete_cmd(), that will call
target_complete_failure_work() -> transport_generic_request_failure(),
upon exception status and invoke cmd->transport_complete_callback()
-> compare_and_write_callback() incorrectly during the failure case.
It adds a check for a non zero se_cmd->scsi_status within the first
invocation of compare_and_write_callback(), and will jump to out plus
up se_device->caw_sem before exiting the callback.
Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Tested-by: Thomas Glanzmann <thomas@glanzmann.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tmr.c')
0 files changed, 0 insertions, 0 deletions