]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hpsa: Fix allocation size for scsi_host_alloc()
authorAlexey V. Vissarionov <gremlin@altlinux.org>
Wed, 18 Jan 2023 03:12:55 +0000 (06:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:43 +0000 (07:52 +0100)
commitaca9c0a3696b14db01cee5735bb1cfa520ef4146
tree1e2a393e43c0436fb3cffdb515a936881d58d17f
parentcbbc1d5bf5cc59eed6cf7c6cf875c1272d0a0515
scsi: hpsa: Fix allocation size for scsi_host_alloc()

[ Upstream commit bbbd25499100c810ceaf5193c3cfcab9f7402a33 ]

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: ef421ae82373 ("hpsa: add driver for HP Smart Array controllers.")
Link: https://lore.kernel.org/r/20230118031255.GE15213@altlinux.org
Signed-off-by: Alexey V. Vissarionov <gremlin@altlinux.org>
Acked-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/hpsa.c