On Sat, 2017-07-08 at 11:15 +0800, tang.wenji@xxxxxxxxxx wrote: > From: Tang Wenji <tang.wenji@xxxxxxxxxx> > > The cmd size should be 4bytes form byte5 to byte8 when CDB opcode is PERSISTENT_RESERVE_OUT in SPC3 and SPC4 > > Signed-off-by: Tang Wenji <tang.wenji@xxxxxxxxxx> > --- > drivers/target/target_core_device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c > index 1c7c57a..e8dd6da 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); > } > Applied, and fixed in spc_parse_cdb() too as mentioned by MNC. Thank you. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html