From: Daniel Yeisley Date: Fri, 3 Nov 2006 06:07:14 +0000 (-0800) Subject: [PATCH] init_reap_node() initialization fix X-Git-Tag: v2.6.19-rc5~43 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f6b8876c7e66b0d15af134e2a5b87e55514eb6d;p=linux-2.6 [PATCH] init_reap_node() initialization fix It looks like there is a bug in init_reap_node() in slab.c that can cause multiple oops's on certain ES7000 configurations. The variable reap_node is defined per cpu, but only initialized on a single CPU. This causes an oops in next_reap_node() when __get_cpu_var(reap_node) returns the wrong value. Fix is below. Signed-off-by: Dan Yeisley Cc: Andi Kleen Acked-by: Christoph Lameter Cc: Pekka Enberg Cc: Manfred Spraul Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.c b/mm/slab.c index 84c631f307..3c4a7e34ed 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -883,7 +883,7 @@ static void init_reap_node(int cpu) if (node == MAX_NUMNODES) node = first_node(node_online_map); - __get_cpu_var(reap_node) = node; + per_cpu(reap_node, cpu) = node; } static void next_reap_node(void)