Skip to content

Commit 8d45169

Browse files
committed
watchdog: Fix CPU hotplug regression
Norbert reported: "3.7-rc6 booted with nmi_watchdog=0 fails to suspend to RAM or offline CPUs. It's reproducable with a KVM guest and physical system." The reason is that commit bcd951c(watchdog: Use hotplug thread infrastructure) missed to take this into account. So the cpu offline code gets stuck in the teardown function because it accesses non initialized data structures. Add a check for watchdog_enabled into that path to cure the issue. Reported-and-tested-by: Norbert Warmuth <nwarmuth@t-online.de> Tested-by: Joseph Salisbury <joseph.salisbury@canonical.com> Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1211231033230.2701@ionos Link: http://bugs.launchpad.net/bugs/1079534 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent b69f085 commit 8d45169

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/watchdog.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ static void watchdog_disable(unsigned int cpu)
368368
{
369369
struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
370370

371+
if (!watchdog_enabled)
372+
return;
373+
371374
watchdog_set_prio(SCHED_NORMAL, 0);
372375
hrtimer_cancel(hrtimer);
373376
/* disable the perf event */

0 commit comments

Comments
 (0)