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>] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <TYCP286MB21461411BA788E6681AF448FC6272@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM>
Date: Fri,  8 Mar 2024 16:01:52 +0800
From: Peng Liu <pngliu@...mail.com>
To:
Cc: tglx@...utronix.de,
	mingo@...hat.com,
	rick.p.edgecombe@...el.com,
	daniel.sneddon@...ux.intel.com,
	dave.hansen@...ux.intel.com,
	linux-kernel@...r.kernel.org,
	x86@...nel.org,
	Peng Liu <pngliu@...mail.com>
Subject: [PATCH] x86/apic: Delete useless BUG_ON in validate_apic_and_package_id()

Both topology_update_package_map() and topology_update_die_map() have a fixed
return value 0. That is, they never fail. So the BUG_ON() checks on them are
useless and better be deleted.

Signed-off-by: Peng Liu <pngliu@...mail.com>
---
 arch/x86/kernel/cpu/common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index fbc4e60d027c..44b08de3971c 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1796,8 +1796,8 @@ static void validate_apic_and_package_id(struct cpuinfo_x86 *c)
 		pr_err(FW_BUG "CPU%u: APIC id mismatch. Firmware: %x APIC: %x\n",
 		       cpu, apicid, c->topo.initial_apicid);
 	}
-	BUG_ON(topology_update_package_map(c->topo.pkg_id, cpu));
-	BUG_ON(topology_update_die_map(c->topo.die_id, cpu));
+	topology_update_package_map(c->topo.pkg_id, cpu);
+	topology_update_die_map(c->topo.die_id, cpu);
 #else
 	c->topo.logical_pkg_id = 0;
 #endif
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ