]> 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>
Sun, 20 Apr 2025 08:15:17 +0000 (10:15 +0200)
commit93a562eedcd5da087e30d7e35374fe2bad38f88e
treedbc082163c0ab18b064dacba092f35f9255df823
parent4ae2c7c7d36976b381352b34eab6bf501afe0f1a
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