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-10-27 16:42:40 +11:00
2009-09-21 06:27:08 +02:00
2008-10-07 14:26:18 +11:00
2010-01-06 15:03:32 -08:00
2011-03-23 13:16:57 -07:00
2008-08-20 16:34:57 +10:00
2009-01-13 14:48:02 +11:00
2009-01-08 16:25:10 +11:00
2011-02-17 15:37:06 -08:00
2009-02-14 14:41:29 -05:00
2009-06-15 21:45:30 -05:00
2008-09-15 11:08:35 -07:00
2009-10-14 16:58:39 +11:00
2009-02-23 10:48:56 +11:00
2011-04-14 16:53:43 -07:00
2009-02-23 15:53:03 +11:00
2009-09-24 15:31:43 +10:00
2009-08-28 14:24:11 +10:00
2009-09-24 15:31:43 +10:00
2009-08-20 10:12:27 +10:00
2010-05-26 14:29:16 -07:00
2009-09-24 15:31:41 +10:00
2009-08-20 11:07:56 +10:00
2009-08-20 10:12:27 +10:00
2009-06-20 10:56:46 -07:00
2009-08-20 10:12:27 +10:00
2009-08-20 10:12:27 +10:00
2009-08-20 10:12:27 +10:00
2009-08-27 13:12:51 +10:00
2010-10-28 21:44:13 -07:00
2009-08-20 10:12:27 +10:00
2009-09-02 16:20:41 +10:00
2009-08-28 14:24:10 +10:00
2008-09-03 20:53:47 +10:00
2008-09-03 20:53:47 +10:00
2008-11-20 10:51:15 -08:00
2009-09-21 06:27:08 +02:00
2008-05-23 22:43:11 +02:00
2009-01-13 14:47:59 +11:00
2010-05-26 14:29:16 -07:00
2009-10-14 16:58:38 +11:00
2009-01-07 11:31:52 -08:00
2008-07-28 16:30:53 +10:00
2009-09-02 16:19:01 +10:00
2008-08-15 08:35:42 -07:00
2011-03-23 13:16:57 -07:00
2009-05-15 16:43:41 +10:00
2009-09-21 14:28:04 +02:00
2009-08-27 13:12:52 +10:00
2011-06-23 15:24:00 -07:00
2008-09-15 11:08:35 -07:00
2008-11-20 10:52:53 -08:00
2009-02-23 10:48:56 +11:00
2009-06-12 21:47:05 +09:30
2009-09-21 14:28:04 +02:00
2009-03-25 08:54:29 -07:00
2009-06-26 16:55:35 +10:00
2009-09-02 15:45:53 +10:00
2011-03-23 13:16:57 -07:00
2009-09-02 15:45:53 +10:00
2009-10-27 16:42:41 +11:00
2009-05-21 15:44:24 +10:00
2009-09-16 07:49:54 -07:00
2010-01-22 15:18:26 -08:00
2009-09-21 14:28:04 +02:00
2011-03-23 13:16:52 -07:00
2009-09-21 14:28:04 +02:00
2009-09-21 14:28:04 +02:00
2009-09-21 14:28:04 +02:00
2009-09-21 14:28:04 +02:00
2009-09-21 14:28:04 +02:00
2008-07-01 11:28:50 +10:00
2010-11-22 10:47:30 -08:00
2009-01-08 16:25:17 +11:00
2008-12-23 15:13:28 +11:00
2010-02-09 04:51:02 -08:00
2009-03-11 17:11:33 +11:00
2009-09-24 15:31:47 +10:00
2009-04-20 12:18:43 -06:00
2009-06-09 16:47:38 +10:00
2009-07-12 12:22:34 -07:00
2009-07-15 17:41:45 +10:00
2008-09-15 11:08:38 -07:00
2011-03-23 13:16:58 -07:00
2009-05-21 15:44:23 +10:00
2009-09-02 16:19:01 +10:00
2009-09-11 16:02:11 +10:00
2011-03-14 14:29:56 -07:00
2009-09-23 18:14:11 -07:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2008-11-05 22:08:28 +11:00
2009-09-24 09:34:48 +09:30
2008-09-06 19:30:24 +01:00
2008-07-28 16:30:47 +10:00
2008-07-24 10:47:21 -07:00
2008-12-21 14:21:16 +11:00
2008-10-07 14:26:20 +11:00
2008-12-21 14:21:15 +11:00
2009-09-23 18:13:10 -07:00
2010-01-18 10:19:11 -08:00
2009-09-11 11:27:58 +10:00
2008-06-26 11:24:38 +02:00
2010-08-13 13:20:13 -07:00
2009-06-09 13:29:25 +10:00
2009-09-21 15:14:54 +02:00
2009-03-11 17:11:34 +11:00
2009-10-27 16:42:40 +11:00
2009-12-18 14:04:35 -08:00
2009-09-24 15:31:43 +10:00
2010-01-18 10:19:51 -08:00