Skip to content

Commit a38a227

Browse files
Chaohai Chenjfvogel
authored andcommitted
scsi: target: spc: Fix RSOC parameter data header size
[ Upstream commit b50532318793d28a7628c1ffc129a2226e83e495 ] The SPC document states that "The COMMAND DATA LENGTH field indicates the length in bytes of the command descriptor list". The length should be subtracted by 4 to represent the length of the description list, not 3. Signed-off-by: Chaohai Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 93a562eedcd5da087e30d7e35374fe2bad38f88e) Signed-off-by: Jack Vogel <[email protected]>
1 parent 7c59532 commit a38a227

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/target/target_core_spc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,7 @@ spc_emulate_report_supp_op_codes(struct se_cmd *cmd)
22432243
response_length += spc_rsoc_encode_command_descriptor(
22442244
&buf[response_length], rctd, descr);
22452245
}
2246-
put_unaligned_be32(response_length - 3, buf);
2246+
put_unaligned_be32(response_length - 4, buf);
22472247
} else {
22482248
response_length = spc_rsoc_encode_one_command_descriptor(
22492249
&buf[response_length], rctd, descr,

0 commit comments

Comments
 (0)