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>
Wed, 1 Feb 2023 07:27:22 +0000 (08:27 +0100)
commitf0227eca972c93b7a6925cb4aae6dad7fedb3705
treec5a38c746c998d536116a47c2bd49a91778e871a
parente5af9a458a13c550b99e105b0890f52e220b2bb2
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: edd163687ea5 ("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