Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1208758lql; Tue, 12 Mar 2024 10:08:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4Uf6zOOlGBGRCJ/AJZJUIQk7tjGMfBWsPcu+REA6GupFPCig4d5dTuxgizahpjMFD1cbg1MHLcj7+3BDjWfmGoF41CmiJQ1pdWQC4qQ== X-Google-Smtp-Source: AGHT+IFulD3w+9NBsEVJluU14RKi0eABns4+qPXWogGnFZCc2D8nCdPXiFhORtfwcJjnmoqbUUmy X-Received: by 2002:a05:6870:9a23:b0:221:a8:b15 with SMTP id fo35-20020a0568709a2300b0022100a80b15mr9825036oab.9.1710263322609; Tue, 12 Mar 2024 10:08:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710263322; cv=pass; d=google.com; s=arc-20160816; b=HbLDArCQKSrZrZVSD6OvZsn1E1tZieux5NgD0iOEa5N1njqOCXHxxwl0qewRUV1oyy GNRGuNLZ2KMVBnwmbJW0IYoOaJa4E2A4Lukc1fHAsf0Z+b77WJ0jsNWVv3DkVuHc99dr tTPnXTAaGZNycbaaFg7lMbuIKKmsqlLNOOpUrWDlL6inZ63XYfJR/vGa1Yt1CcCjvwLl yYB0uI+Bi9gW6u2B0b0gDhQnwL+atJ2tUCZE73VGnF0oZVVRhOeP64J8JNq9n73cBW/o /T2fD4sh1b/LUCoevHEEDmQoYwWVU0GvsQo0pfwdAsMir+Ev6yAXa7QNaCyodNUaqA/q wj+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=knlMtRguI/MJIyBOh76sCNenk73mrRDyUepnbXn7MG8=; fh=NjiJ/stVZOsYmztfVjfu94tCghhTYkhzlx4srFWL52Q=; b=Hdi6R16et1i0U5lidkr2oWEzQ8FVJuau1pDQW6rx1R4yJ7LgDQB2I7cDlQwqTB2Hmo ULrLjZXYQSwkv+mAnp6UYgcGtbYtwaFR3P0ZGBxF+t+Ak7TK/4FF3qEKRvhi/Ngvh6Nf NXnmiMZ5L6H9DwIQZSFuv85P1cJ7q7+s+PNGE0PTZ8FcG0FA2q+CJkk02PEujfLMo0Ga hcI1ZxgWCGpc9A+ugtY9GkkjnFw0cZq3PihfOP1tnzPlbk+gXbaAelBeSIMRV+J7kFY+ 8iC5jvEKXyPcGt2W85Pe4BZaGX7SPuTOVTG8+PDk17gw+baUYRrqV1BzO3eLbLxt3omw mBgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b=oMCXll2L; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-100573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j26-20020a0561023e1a00b004732d925214si862541vsv.124.2024.03.12.10.08.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 10:08:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b=oMCXll2L; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-100573-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1376D1C21F68 for ; Tue, 12 Mar 2024 17:08:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC9CA139596; Tue, 12 Mar 2024 17:05:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="oMCXll2L" Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5500C7E588; Tue, 12 Mar 2024 17:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710263150; cv=none; b=OOe7hPvMpGqR/lQ9dNwIRU3otbAzIeEy7pJsQnbeoOGOd4KKYC9I/HFFa76xdtGy6U9x9u2OyOmP1/RQ1pIBv173sf0SdMI9+77VsTjJc+2lPFOrSZn7PYWqtEHAGxjWdAJMTEapBg+89vjjpShcrKjYKo721kJgilk8H31RPLg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710263150; c=relaxed/simple; bh=LzMfc3Bfkh1i6+N8DfOBZ/1219smYkJwNoEcdXTyU20=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=CM6hrwai+CrkBOxO/Yz2rjct/D8BmFN61DdCXTLLk056Ns+WT+pbnjOK9GLzYC9xtf+F/ee8F3+Vdr1tItsfgDIJw0qasqWnltDnduquQqEoR8AC+6CZDO2V7r+VyJ+WUM06G6InJWzn3a3W07tmbNvWrk1T0c9CQ9xvSMCTfWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=oMCXll2L; arc=none smtp.client-ip=83.149.199.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru Received: from ykarpov.intra.ispras.ru (unknown [10.10.2.71]) by mail.ispras.ru (Postfix) with ESMTPSA id A9ABC40AC4FF; Tue, 12 Mar 2024 17:05:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru A9ABC40AC4FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1710263144; bh=knlMtRguI/MJIyBOh76sCNenk73mrRDyUepnbXn7MG8=; h=From:To:Cc:Subject:Date:From; b=oMCXll2LI9+rl4uX+je3gSIoHKI9ST9i+DGS8WLG8iZ8gIXeIHG6elpnlS+8wS+oL rTNMTsmFVcfeZNRrnK8dRdg5zsA09XqmJxM5BOI1XoTSrxymnpJiYwwYD290VbbJrh 9OolDIOSVhl8JHMEbY+4qYRJAGGrWT2r0B2EkICM= From: Yuri Karpov To: Don Brace Cc: Yuri Karpov , "James E.J. Bottomley" , "Martin K. Petersen" , "Alexey V. Vissarionov" , storagedev@microchip.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] scsi: hpsa: Fix allocation size for Scsi_Host private data Date: Tue, 12 Mar 2024 20:04:47 +0300 Message-Id: <20240312170447.743709-1-YKarpov@ispras.ru> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index af18d20f3079..4ad32de61bb8 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; -- 2.34.1