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 792DD8F54; Tue, 17 Jun 2025 16:44:22 +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=1750178662; cv=none; b=d+TzN9opXNEN9M25B8DkU5N+CCqQ9ENkyfPqya7DyVHxMVUj5DiUi5c+jt1BwdTAoCOqYFHUBnSaNbKIbJvgK/HW1DPBEGldZhtLAOTNjma2SIFeGxMo16+wW2PnxtRJltMajZsHsgbI4sySkr6TIxYJjdz+C37IDXWggrMefds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750178662; c=relaxed/simple; bh=Fmm949Uz7hYzprJeTAAbXXGZ7SaKVVHtkND1TPa2/no=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K05TobKBg0+W4d43946t9WayDDqgORIpoac4g3pLB1uX7rTfxr9vU0k7jJbCrcG8jdfrIjmjP5MkngdNkt4cSpgvaMOlMHtymZVybsoveMp8M9wyA8cXUA+CABMGcvciKmSC1oCuVQJvTrkRCnFvxuXlRNwqt+9vPlDXA7kjiIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p2EzBkzT; 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="p2EzBkzT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4FF1C4CEE3; Tue, 17 Jun 2025 16:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750178662; bh=Fmm949Uz7hYzprJeTAAbXXGZ7SaKVVHtkND1TPa2/no=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p2EzBkzT7wT+VpXUWkGFKxt4YzAJK6qxZAmTIOlvY3olHN/nR7g1V7gqxrVY8UP6l IyRdgKIe/uxFD+WFBOMJx8H0wyYTtIW5CedieWoTodrvaUQ66azYyBwWeY/EOTw8aG DNwSkQ84kBnNOl1cyqgo1WlhxwmKptrtZ3NBH/P4= 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.15 508/780] PCI/DPC: Initialize aer_err_info before using it Date: Tue, 17 Jun 2025 17:23:36 +0200 Message-ID: <20250617152512.194627740@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617152451.485330293@linuxfoundation.org> References: <20250617152451.485330293@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.15-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 df42f15c98295..3daaf61c79c9f 100644 --- a/drivers/pci/pcie/dpc.c +++ b/drivers/pci/pcie/dpc.c @@ -258,7 +258,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