From nobody Tue Dec 30 20:31:06 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53F90C4332F for ; Fri, 10 Nov 2023 19:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236256AbjKJTsB (ORCPT ); Fri, 10 Nov 2023 14:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236274AbjKJTrq (ORCPT ); Fri, 10 Nov 2023 14:47:46 -0500 Received: from relay161.nicmail.ru (relay161.nicmail.ru [91.189.117.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 003FB6A48; Fri, 10 Nov 2023 11:45:24 -0800 (PST) Received: from [10.28.138.149] (port=40524 helo=[192.168.95.111]) by relay.hosting.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1r1XRP-0007NN-6C; Fri, 10 Nov 2023 22:45:20 +0300 Received: from [87.245.155.195] (account kiryushin@ancud.ru HELO [192.168.95.111]) by incarp1102.mail.hosting.nic.ru (Exim 5.55) with id 1r1XRP-00H8mB-2j; Fri, 10 Nov 2023 22:45:19 +0300 Message-ID: Date: Fri, 10 Nov 2023 22:45:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Nikita Kiryushin Subject: [PATCH] ACPI: OSL: Initialize output value To: "Rafael J. Wysocki" Cc: Len Brown , Lin Ming , Bob Moore , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-MS-Exchange-Organization-SCL: -1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8"; format="flowed" Buffer variable for result (value32) is not initialized. This can lead to unexpected behavior, if underlying platform-specific raw_pci_read fails to report error (uninitialized value will be treated as valid pci-read result), or exposition of unexpected data to PCI=20 config space reader. Zeroing of buffer value addresses the later problem and makes the=20 behavior in the former case somewhat more predictable. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: c5f0231ee6b0 ("ACPICA: Fix acpi_os_read_pci_configuration prototype") Signed-off-by: Nikita Kiryushin --- drivers/acpi/osl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index c09cc3c68633..d3c0f7f01a29 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -788,7 +788,7 @@ acpi_os_read_pci_configuration(struct acpi_pci_id=20 *pci_id, u32 reg, u64 *value, u32 width) { int result, size; - u32 value32; + u32 value32 =3D 0U; if (!value) return AE_BAD_PARAMETER; --=20 2.34.1