public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: check boundry in setup_node_bootmem()
@ 2009-04-22 21:19 Yinghai Lu
  2009-04-23  8:00 ` [tip:x86/urgent] x86: check boundary " tip-bot for Yinghai Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2009-04-22 21:19 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin
  Cc: linux-kernel@vger.kernel.org, Jack Steiner


|commit dc098551918093901d8ac8936e9d1a1b891b56ed
|Author: Jack Steiner <steiner@sgi.com>
|Date:   Fri Apr 17 09:22:42 2009 -0500
|
|    x86/uv: fix init of memory-less nodes
|    
|    Add support for nodes that have cpus but no memory.
|    The current code was failing to add these nodes
|    to the nodes_present_map.
|    
|    v2: Fixes case caught by David Rientjes - missed support
|        for the x2apic SRAT table.
|    
|    [ Impact: fix potential boot crash on memory-less UV nodes. ]

cause one two sockets system that node1 doesn't have ram install crash.

becuase that patch make node_possible include cpu nodes do not have memory.

so try to check bounday in setup_node_bootmem

[Impact: fix boot panic caused by node_possible_node change]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index d73aaa8..b311a1e 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -188,6 +188,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
 	const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE);
 	int nid;
 
+	if (!end)
+		return;
+
 	start = roundup(start, ZONE_ALIGN);
 
 	printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:x86/urgent] x86: check boundary in setup_node_bootmem()
  2009-04-22 21:19 [PATCH] x86: check boundry in setup_node_bootmem() Yinghai Lu
@ 2009-04-23  8:00 ` tip-bot for Yinghai Lu
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Yinghai Lu @ 2009-04-23  8:00 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, yinghai, steiner, tglx, mingo

Commit-ID:  4c31e92b97b6d7e7b19ee5e54a22571ffdebb305
Gitweb:     http://git.kernel.org/tip/4c31e92b97b6d7e7b19ee5e54a22571ffdebb305
Author:     Yinghai Lu <yinghai@kernel.org>
AuthorDate: Wed, 22 Apr 2009 14:19:27 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 23 Apr 2009 09:58:56 +0200

x86: check boundary in setup_node_bootmem()

Commit dc09855 ("x86/uv: fix init of memory-less nodes") causes a
two sockets system (where node-1 doesn't have RAM installed) to crash.

That commit makes node_possible include cpu nodes that do not have memory.
So check boundary in setup_node_bootmem().

[ Impact: fix boot crash on RAM-less NUMA node system ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Jack Steiner <steiner@sgi.com>
LKML-Reference: <49EF89DF.9090404@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/numa_64.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index d73aaa8..2d05a12 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -188,6 +188,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
 	const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE);
 	int nid;
 
+	if (!end)
+		return;
+
 	start = roundup(start, ZONE_ALIGN);
 
 	printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-23  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-22 21:19 [PATCH] x86: check boundry in setup_node_bootmem() Yinghai Lu
2009-04-23  8:00 ` [tip:x86/urgent] x86: check boundary " tip-bot for Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox