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: <20231107165529.407349-1-nik.borisov@suse.com>
Date:   Tue,  7 Nov 2023 18:55:29 +0200
From:   Nikolay Borisov <nik.borisov@...e.com>
To:     bp@...en8.de
Cc:     linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
        x86@...nel.org, Nikolay Borisov <nik.borisov@...e.com>
Subject: [PATCH] x86/mce: Remove redundant check from  mce_device_create()

mce_device_create() is called only from mce_cpu_online() which in turn
will be called iff mce is available. That is, at the time of
mce_device_create() call it's guaranteed that mce is available. No need
to duplicate this check so let's remove it.

Signed-off-by: Nikolay Borisov <nik.borisov@...e.com>
---
 arch/x86/kernel/cpu/mce/core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 7b397370b4d6..71999f97a3c8 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -2568,9 +2568,6 @@ static int mce_device_create(unsigned int cpu)
 	int err;
 	int i, j;
 
-	if (!mce_available(&boot_cpu_data))
-		return -EIO;
-
 	dev = per_cpu(mce_device, cpu);
 	if (dev)
 		return 0;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ