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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 2 Mar 2007 09:03:29 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Badari Pulavarty <pbadari@...il.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: [patch -mm] x86_64: fake numa cmdline flag fix

Make sure we only reference 'cmdline' on CONFIG_NUMA_EMU.

Signed-off-by: David Rientjes <rientjes@...gle.com>
---
 arch/x86_64/mm/numa.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -524,22 +524,28 @@ void __init numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn)
 { 
 	unsigned long start_addr = start_pfn << PAGE_SHIFT;
 	unsigned long end_addr = end_pfn << PAGE_SHIFT;
+	int numa_fake = 0;
 	int i;
 
+#ifdef CONFIG_NUMA_EMU
+	/* Determine if we have a numa=fake command line */
+	if (cmdline != 0)
+		numa_fake = 1;
+#endif
+
 #ifdef CONFIG_ACPI_NUMA
-	if (!numa_off && !cmdline && !acpi_scan_nodes(start_addr, end_addr))
+	if (!numa_off && !numa_fake && !acpi_scan_nodes(start_addr, end_addr))
  		return;
 #endif
 
 #ifdef CONFIG_K8_NUMA
-	if (!numa_off && !k8_scan_nodes(start_addr, end_addr, cmdline != 0))
-		if (cmdline == 0)
+	if (!numa_off && !k8_scan_nodes(start_addr, end_addr, numa_fake))
+		if (!numa_fake)
 			return;
 #endif
 
 #ifdef CONFIG_NUMA_EMU
-	if (cmdline)
-	{
+	if (numa_fake) {
 		numa_emu = !numa_emulation(start_pfn, end_pfn);
 		if (numa_emu)
 			return;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ