Skip to content

Commit 93a562e

Browse files
Chaohai Chengregkh
authored andcommitted
scsi: target: spc: Fix RSOC parameter data header size
[ Upstream commit b505323 ] 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 <wdhh66@163.com> Link: https://lore.kernel.org/r/20250115070739.216154-1-wdhh66@163.com Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4ae2c7c commit 93a562e

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)