Files
linux/arch/powerpc/kernel
Milton Miller c3bf529341 powerpc/kexec: Fix memory corruption from unallocated slaves
commit 3d2cea732d upstream.

Commit 1fc711f7ff (powerpc/kexec: Fix race
in kexec shutdown) moved the write to signal the cpu had exited the kernel
from before the transition to real mode in kexec_smp_wait to kexec_wait.

Unfornately it missed that kexec_wait is used both by cpus leaving the
kernel and by secondary slave cpus that were not allocated a paca for
what ever reason -- they could be beyond nr_cpus or not described in
the current device tree for whatever reason (for example, kexec-load
was not refreshed after a cpu hotplug operation).  Cpus coming through
that path they will write to paca[NR_CPUS] which is beyond the space
allocated for the paca data and overwrite memory not allocated to pacas
but very likely still real mode accessable).

Move the write back to kexec_smp_wait, which is used only by cpus that
found their paca, but after the transition to real mode.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:00 -07:00
..
2009-08-28 14:24:10 +10:00
2008-05-23 22:43:11 +02:00
2010-02-09 04:51:02 -08:00
2009-07-12 12:22:34 -07:00
2008-12-21 14:21:16 +11:00
2009-09-23 18:13:10 -07:00
2010-01-18 10:19:11 -08:00
2009-10-27 16:42:40 +11:00