summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-08-09 15:41:24 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-09 16:45:31 +0300
commit8e23692175ad465628b8c86c1acc154fecad97be (patch)
treea8d0f84c73ba61a103fda798a8ef39073c3c1610 /arch
parent26c5c6e129ee725f103938262a034861ada467ae (diff)
downloadlinux-8e23692175ad465628b8c86c1acc154fecad97be.tar.xz
powerpc/watchdog: Fix final-check recovered case
When the watchdog decides to panic, it takes the lock and double checks everything (to avoid races with the CPU being unstuck or panic()ed by something else). The exit label was misplaced and would result in all-CPUs backtrace and watchdog panic even in the case that the condition was found to be resolved. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/watchdog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 426dd34891d6..7d16dafa1bb6 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -144,7 +144,6 @@ static void watchdog_smp_panic(int cpu, u64 tb)
for_each_cpu(c, &wd_smp_cpus_pending)
set_cpu_stuck(c, tb);
-out:
wd_smp_unlock(&flags);
printk_safe_flush();
@@ -157,6 +156,11 @@ out:
if (hardlockup_panic)
nmi_panic(NULL, "Hard LOCKUP");
+
+ return;
+
+out:
+ wd_smp_unlock(&flags);
}
static void wd_smp_clear_cpu_pending(int cpu, u64 tb)