mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] init_reap_node() initialization fix
@ 2006-10-31 21:05 Daniel Yeisley
  2006-10-31 21:25 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Yeisley @ 2006-10-31 21:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: ak, akpm

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 <dan.yeisley@unisys.com>
---

diff -Naur linux-2.6.19-rc3-org/mm/slab.c linux-2.6.19-rc3-work/mm/slab.c
--- linux-2.6.19-rc3-org/mm/slab.c      2006-10-23 19:02:02.000000000 -0400
+++ linux-2.6.19-rc3-work/mm/slab.c     2006-10-30 11:45:28.000000000 -0500
@@ -883,7 +883,7 @@
        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)





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

* Re: [PATCH] init_reap_node() initialization fix
  2006-10-31 21:05 [PATCH] init_reap_node() initialization fix Daniel Yeisley
@ 2006-10-31 21:25 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-10-31 21:25 UTC (permalink / raw)
  To: Daniel Yeisley; +Cc: akpm, linux-kernel

Daniel Yeisley <dan.yeisley@unisys.com> writes:

> 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.

Agreed. The cpu up call back is usually called on the BP only,
so __get_cpu_var which uses a local variable is wrong here.

-Andi

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

end of thread, other threads:[~2006-10-31 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-31 21:05 [PATCH] init_reap_node() initialization fix Daniel Yeisley
2006-10-31 21:25 ` Andi Kleen

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

Powered by JetHome