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

Signed-off-by: Nicholas Piggin <npig...@gmail.com>
 arch/powerpc/kernel/watchdog.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index 2806383d2339..5a69654075c1 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);
@@ -157,6 +156,11 @@ static void watchdog_smp_panic(int cpu, u64 tb)
        if (hardlockup_panic)
                nmi_panic(NULL, "Hard LOCKUP");
+       return;
+       wd_smp_unlock(&flags);
 static void wd_smp_clear_cpu_pending(int cpu, u64 tb)

Reply via email to