Commit a11618a3 authored by Alexey V. Vissarionov's avatar Alexey V. Vissarionov Committed by sanglipeng
Browse files

scsi: hpsa: Fix allocation size for scsi_host_alloc()

stable inclusion
from stable-v5.10.166
commit ce3aa7694627c35e761459d8dbd1b3b4ef0121ce
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87FRA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ce3aa7694627c35e761459d8dbd1b3b4ef0121ce

--------------------------------

[ Upstream commit bbbd2549 ]

The 'h' is a pointer to struct ctlr_info, so it's just 4 or 8 bytes, while
the structure itself is much bigger.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: edd16368 ("hpsa: add driver for HP Smart Array controllers.")
Link: https://lore.kernel.org/r/20230118031255.GE15213@altlinux.org


Signed-off-by: default avatarAlexey V. Vissarionov <gremlin@altlinux.org>
Acked-by: default avatarDon Brace <don.brace@microchip.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 6af1d6b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment