lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230804170354.3560038-1-alexander.antonov@linux.intel.com>
Date:   Fri,  4 Aug 2023 10:03:54 -0700
From:   alexander.antonov@...ux.intel.com
To:     peterz@...radead.org, linux-kernel@...r.kernel.org
Cc:     colin.i.king@...il.com, alexander.antonov@...ux.intel.com
Subject: [PATCH] perf/x86/intel/uncore: Fix uninitialized variable in skx_upi_topology_cb()

From: Alexander Antonov <alexander.antonov@...ux.intel.com>

Fix a potential return of an uninitialized 'ret' variable in
skx_upi_topology_cb() function.

Fixes: c1c1942b49ea ("perf/x86/intel/uncore: Enable UPI topology discovery for Skylake Server")
Reported-by: Colin King <colin.i.king@...il.com>
Closes: https://lore.kernel.org/lkml/21e2ea66-9524-8e34-a2f0-8e16b9617d68@gmail.com/
Signed-off-by: Alexander Antonov <alexander.antonov@...ux.intel.com>
---
 arch/x86/events/intel/uncore_snbep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index d49e90dc04a4..d857fc00511b 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -4330,7 +4330,7 @@ static int upi_fill_topology(struct pci_dev *dev, struct intel_uncore_topology *
 static int skx_upi_topology_cb(struct intel_uncore_type *type, int segment,
 				int die, u64 cpu_bus_msr)
 {
-	int idx, ret;
+	int idx, ret = -ENODEV;
 	struct intel_uncore_topology *upi;
 	unsigned int devfn;
 	struct pci_dev *dev = NULL;

base-commit: c1a515d3c0270628df8ae5f5118ba859b85464a2
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ