]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: target: spc: Fix RSOC parameter data header size
authorChaohai Chen <wdhh66@163.com>
Wed, 15 Jan 2025 07:07:39 +0000 (15:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:14 +0000 (10:45 +0200)
commit4ae2e891552ec331f62db61875ce38f817fd7855
treeef4a6c7303c050183bfc9eddc19dfb4eebf61573
parent4fc5c17538cbf7ab69e55771095e839607e46b8a
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 <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>
drivers/target/target_core_spc.c