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: <20210918061557.238461-1-yang.guang5@zte.com.cn>
Date:   Sat, 18 Sep 2021 06:15:57 +0000
From:   cgel.zte@...il.com
To:     dave.hansen@...ux.intel.com
Cc:     luto@...nel.org, peterz@...radead.org, tglx@...utronix.de,
        mingo@...hat.com, bp@...en8.de, x86@...nel.org, hpa@...or.com,
        linux-kernel@...r.kernel.org, Yang Guang <yang.guang5@....com.cn>
Subject: [PATCH] Modify the check condition

From: Yang Guang <yang.guang5@....com.cn>

The numa_distance is NULL or numa_alloc_distance() return error
state, It should return. So the "&&" should been changed to "||".

Signed-off-by: Yang Guang <yang.guang5@....com.cn>
---
 arch/x86/mm/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index 1e9b93b088db..fa73648aeeb0 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -419,7 +419,7 @@ static int __init numa_alloc_distance(void)
  */
 void __init numa_set_distance(int from, int to, int distance)
 {
-	if (!numa_distance && numa_alloc_distance() < 0)
+	if (!numa_distance || numa_alloc_distance() < 0)
 		return;
 
 	if (from >= numa_distance_cnt || to >= numa_distance_cnt ||
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ