Commit 8e236921 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

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: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 26c5c6e1
...@@ -144,7 +144,6 @@ static void watchdog_smp_panic(int cpu, u64 tb) ...@@ -144,7 +144,6 @@ static void watchdog_smp_panic(int cpu, u64 tb)
for_each_cpu(c, &wd_smp_cpus_pending) for_each_cpu(c, &wd_smp_cpus_pending)
set_cpu_stuck(c, tb); set_cpu_stuck(c, tb);
out:
wd_smp_unlock(&flags); wd_smp_unlock(&flags);
printk_safe_flush(); printk_safe_flush();
...@@ -157,6 +156,11 @@ static void watchdog_smp_panic(int cpu, u64 tb) ...@@ -157,6 +156,11 @@ static void watchdog_smp_panic(int cpu, u64 tb)
if (hardlockup_panic) if (hardlockup_panic)
nmi_panic(NULL, "Hard LOCKUP"); nmi_panic(NULL, "Hard LOCKUP");
return;
out:
wd_smp_unlock(&flags);
} }
static void wd_smp_clear_cpu_pending(int cpu, u64 tb) static void wd_smp_clear_cpu_pending(int cpu, u64 tb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment