powerpc/kdump64: Don't reference freed memory as pacas
authorMilton Miller <miltonm@bga.com>
Tue, 10 May 2011 19:28:41 +0000 (19:28 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 19 May 2011 04:30:44 +0000 (14:30 +1000)
Starting with 1426d5a3bd07589534286375998c0c8c6fdc5260 (powerpc:
Dynamically allocate pacas) the space for pacas beyond cpu_possible
is freed, but we failed to update the loop in crash.c.

Since c1854e00727f50f7ac99e98d26ece04c087ef785 (powerpc: Set nr_cpu_ids
early and use it to free PACAs) the number of pacas allocated is
always nr_cpu_ids.

Signed-off-by: Milton Miller <miltonm@bga.com>
Cc: <stable@kernel.org> # .34.x
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/crash.c

index 21f2c78..4e6ee94 100644 (file)
@@ -236,7 +236,7 @@ static void crash_kexec_wait_realmode(int cpu)
        int i;
 
        msecs = 10000;
-       for (i=0; i < NR_CPUS && msecs > 0; i++) {
+       for (i=0; i < nr_cpu_ids && msecs > 0; i++) {
                if (i == cpu)
                        continue;