aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_parameters.c
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2021-03-30 19:47:27 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-10 13:24:03 -0400
commit1ee2753422349723d27009f2f973d03289d430ab (patch)
tree93585d8287ed504d2129b25e1c2588955dcebaf2 /drivers/target/iscsi/iscsi_target_parameters.c
parentLinux 5.13-rc1 (diff)
downloadlinux-dev-1ee2753422349723d27009f2f973d03289d430ab.tar.xz
linux-dev-1ee2753422349723d27009f2f973d03289d430ab.zip
scsi: core: Treat device offline as a failure
When a SCSI device is offline a MODE SENSE command will return a result with only DID_NO_CONNECT set. In sd_read_write_protect_flag() only the status byte of the result is checked. Despite a returned status of DID_NO_CONNECT the command is considered successful and we read sdkp->write_prot from a buffer containing garbage. Modify scsi_status_is_good() to treat DID_NO_CONNECT as a failure case. Link: https://lore.kernel.org/r/20210330114727.234467-1-yanaijie@huawei.com Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_parameters.c')
0 files changed, 0 insertions, 0 deletions