summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorYuri Karpov <YKarpov@ispras.ru>2024-03-12 18:04:47 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-04-20 16:55:12 +0200
commit504e2bed5d50610c1836046c0c195b0a6dba9c72 (patch)
tree79aa6186df88ef871634218223c0844dd265b9cd /drivers/scsi
parentMerge patch series "scsi: libsas: Fix the failure of adding phy with zero-add... (diff)
downloadlinux-504e2bed5d50610c1836046c0c195b0a6dba9c72.tar.xz
linux-504e2bed5d50610c1836046c0c195b0a6dba9c72.zip
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: bbbd25499100 ("scsi: hpsa: Fix allocation size for scsi_host_alloc()") Signed-off-by: Yuri Karpov <YKarpov@ispras.ru> Link: https://lore.kernel.org/r/20240312170447.743709-1-YKarpov@ispras.ru Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index af18d20f3079..49c57a9c110b 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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;