diff options
author | Tang Wenji <tang.wenji@zte.com.cn> | 2017-07-08 06:15:44 +0300 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2017-07-10 06:58:49 +0300 |
commit | 388fe6996bf658146e70c0df986981eae4be0385 (patch) | |
tree | 8b0c999ac9c82a61254d47802903442b9ae4f99d /drivers/target/target_core_device.c | |
parent | de8c5221aa003935d6d31becf5850b247dff14a1 (diff) | |
download | linux-388fe6996bf658146e70c0df986981eae4be0385.tar.xz |
target: Fix cmd size for PR-OUT in passthrough_parse_cdb
The cmd size should be 4bytes form byte5 to byte8 when CDB opcode
is PERSISTENT_RESERVE_OUT in SPC3 and SPC4
(Also fix up the same in spc_parse_cdb - MNC)
Signed-off-by: Tang Wenji <tang.wenji@zte.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r-- | drivers/target/target_core_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index 1c7c57a3c52e..e8dd6da164b2 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -1183,7 +1183,7 @@ passthrough_parse_cdb(struct se_cmd *cmd, } if (cdb[0] == PERSISTENT_RESERVE_OUT) { cmd->execute_cmd = target_scsi3_emulate_pr_out; - size = get_unaligned_be16(&cdb[7]); + size = get_unaligned_be32(&cdb[5]); return target_cmd_size_check(cmd, size); } |