mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
de8c5221aa
commit
388fe6996b
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1307,7 +1307,7 @@ spc_parse_cdb(struct se_cmd *cmd, unsigned int *size)
|
|||
cmd->execute_cmd = target_scsi3_emulate_pr_in;
|
||||
break;
|
||||
case PERSISTENT_RESERVE_OUT:
|
||||
*size = get_unaligned_be16(&cdb[7]);
|
||||
*size = get_unaligned_be32(&cdb[5]);
|
||||
cmd->execute_cmd = target_scsi3_emulate_pr_out;
|
||||
break;
|
||||
case RELEASE:
|
||||
|
|
Loading…
Reference in a new issue