From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7542B2ECEA6; Tue, 17 Jun 2025 16:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177315; cv=none; b=STbLHDdX9GYtLJrAs9pdjDMG3THt0AAimTw/sN9fbbnfZi/Uop6c6Ziqdx7zxKm8oKYS68YuVwvwQck42jRvMumpqLi8SR0nSD5oB2eC4Yb5BIujcpaW4VSv+7azle4fkzJzKV9oHyTib3Txr/twuvo/dw4y6iiSFo5i24ufMgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750177315; c=relaxed/simple; bh=TpfZcHSBRwj/mLsbRKCsWZXfpBSrtbogjXCmDagdPoM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d1mrhSUwYm2E4zbvSn7dsKVaTc7KzMFKDSKYyFz+zUH1wU2Lncd/hw0uFj66LI7VbnBtdF5Lp6mt4PkHSjKd4Zd8drG6YK+t5SmNmZlsjFOWmrvSfjn/BD5Q3p4OKgOKkESV6/c7dX0ulkInNuWClJyLtlx11mKC8/tk07NtykA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z0shGmBR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z0shGmBR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0AD8C4CEE3; Tue, 17 Jun 2025 16:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750177315; bh=TpfZcHSBRwj/mLsbRKCsWZXfpBSrtbogjXCmDagdPoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z0shGmBRQtzKGooutEZ9VRXOKOUXM6MRnREm0tuLB6alZxyvMzotLO4NMdcYYJG5U XExQ8lDzghjZZw6BOsmIMk4cP4dOVCdhs8ytQp010yCVhCdwwUWxVL5im0qzcjU3s0 vALwUNKsZuHjeCLNLgXr0/uKJQtztPkfeUUPM0d8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bjorn Helgaas , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Kuppuswamy Sathyanarayanan , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.12 317/512] PCI/DPC: Initialize aer_err_info before using it Date: Tue, 17 Jun 2025 17:24:43 +0200 Message-ID: <20250617152432.457585073@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152419.512865572@linuxfoundation.org> References: <20250617152419.512865572@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Helgaas [ Upstream commit a424b598e6a6c1e69a2bb801d6fd16e805ab2c38 ] Previously the struct aer_err_info "info" was allocated on the stack without being initialized, so it contained junk except for the fields we explicitly set later. Initialize "info" at declaration so it starts as all zeros. Fixes: 8aefa9b0d910 ("PCI/DPC: Print AER status in DPC event handling") Signed-off-by: Bjorn Helgaas Tested-by: Krzysztof Wilczyński Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20250522232339.1525671-2-helgaas@kernel.org Signed-off-by: Sasha Levin --- drivers/pci/pcie/dpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c index 2b6ef7efa3c11..8096e4858553e 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -260,7 +260,7 @@ static int dpc_get_aer_uncorrect_severity(struct pci_dev *dev, void dpc_process_error(struct pci_dev *pdev) { u16 cap = pdev->dpc_cap, status, source, reason, ext_reason; - struct aer_err_info info; + struct aer_err_info info = {}; pci_read_config_word(pdev, cap + PCI_EXP_DPC_STATUS, &status); pci_read_config_word(pdev, cap + PCI_EXP_DPC_SOURCE_ID, &source); -- 2.39.5