From: Dan Yeisley Date: Thu, 8 Mar 2007 07:01:53 +0000 (+0100) Subject: init_reap_node() initialization fix X-Git-Tag: v2.6.16.44-rc1~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4a990d10083535d9f0927cd81dcc3b18d0ec3cac;p=karo-tx-linux.git 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 Signed-off-by: Adrian Bunk --- diff --git a/mm/slab.c b/mm/slab.c index d0bd7f07ab04..c58d3b81be0f 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -806,7 +806,7 @@ static void init_reap_node(int cpu) if (node == MAX_NUMNODES) node = 0; - __get_cpu_var(reap_node) = node; + per_cpu(reap_node, cpu) = node; } static void next_reap_node(void)