[PATCH] powerpc/kdump: Fix timeout in crash_kexec_wait_realmode
Anton Blanchard
anton at samba.org
Tue Jul 5 16:12:02 EST 2011
We check for timeout expiry in the outer loop, but we also need to
check it in the inner loop or we can lock up forever waiting for a
CPU to hit real mode.
Signed-off-by: Anton Blanchard <anton at samba.org>
Cc: <stable at kernel.org>
---
Index: linux-powerpc/arch/powerpc/kernel/crash.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/kernel/crash.c 2011-07-05 15:04:18.512140484 +1000
+++ linux-powerpc/arch/powerpc/kernel/crash.c 2011-07-05 15:05:51.483747575 +1000
@@ -240,7 +240,8 @@ static void crash_kexec_wait_realmode(in
if (i == cpu)
continue;
- while (paca[i].kexec_state < KEXEC_STATE_REAL_MODE) {
+ while ((paca[i].kexec_state < KEXEC_STATE_REAL_MODE) &&
+ (msecs > 0)) {
barrier();
if (!cpu_possible(i)) {
break;
More information about the Linuxppc-dev
mailing list