Files
android_kernel_xiaomi_sm8450/arch/powerpc/kernel
Milton Miller 3d2cea732d powerpc/kexec: Fix memory corruption from unallocated slaves
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>
Cc: <stable@kernel.org> # (1fc711f was backported to 2.6.32)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-05-19 14:30:43 +10:00
..
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-27 13:02:02 +10:00
2011-03-30 10:44:00 +11:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-27 14:18:44 +10:00
2011-03-31 11:26:23 -03:00
2011-05-04 15:02:15 +10:00
2011-03-31 11:26:23 -03:00
2010-10-05 17:27:54 -07:00
2011-03-31 11:26:23 -03:00
2010-12-09 15:35:32 +11:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-27 14:18:44 +10:00
2010-09-22 09:33:50 -07:00
2010-07-19 10:56:54 +02:00
2011-03-31 11:26:23 -03:00
2010-03-12 15:52:32 -08:00