Commit 504e2bed authored by Yuri Karpov's avatar Yuri Karpov Committed by Martin K. Petersen

scsi: hpsa: Fix allocation size for Scsi_Host private data

struct Scsi_Host private data contains pointer to struct ctlr_info.

Restore allocation of only 8 bytes to store pointer in struct Scsi_Host
private data area.

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

Fixes: bbbd2549 ("scsi: hpsa: Fix allocation size for scsi_host_alloc()")
Signed-off-by: default avatarYuri Karpov <YKarpov@ispras.ru>
Link: https://lore.kernel.org/r/20240312170447.743709-1-YKarpov@ispras.ruSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9cf0c123
......@@ -5850,7 +5850,7 @@ static int hpsa_scsi_host_alloc(struct ctlr_info *h)
{
struct Scsi_Host *sh;
sh = scsi_host_alloc(&hpsa_driver_template, sizeof(struct ctlr_info));
sh = scsi_host_alloc(&hpsa_driver_template, sizeof(struct ctlr_info *));
if (sh == NULL) {
dev_err(&h->pdev->dev, "scsi_host_alloc failed\n");
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment