linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, joseph.salisbury@canonical.com,
	nwarmuth@t-online.de
Subject: [tip:core/urgent] watchdog: Fix CPU hotplug regression
Date: Tue, 4 Dec 2012 11:10:57 -0800	[thread overview]
Message-ID: <tip-8d4516904b39507458bee8115793528e12b1d8dd@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1211231033230.2701@ionos>

Commit-ID:  8d4516904b39507458bee8115793528e12b1d8dd
Gitweb:     http://git.kernel.org/tip/8d4516904b39507458bee8115793528e12b1d8dd
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Tue, 4 Dec 2012 18:59:34 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 4 Dec 2012 19:56:59 +0100

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 bcd951cf(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>
---
 kernel/watchdog.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index dd4b80a..c8c21be 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -368,6 +368,9 @@ static void watchdog_disable(unsigned int cpu)
 {
 	struct hrtimer *hrtimer = &__raw_get_cpu_var(watchdog_hrtimer);
 
+	if (!watchdog_enabled)
+		return;
+
 	watchdog_set_prio(SCHED_NORMAL, 0);
 	hrtimer_cancel(hrtimer);
 	/* disable the perf event */

      parent reply	other threads:[~2012-12-04 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  9:01 [regression] 3.7+ suspend to RAM/offline CPU fails with nmi_watchdog=0 (bisected) Norbert Warmuth
2012-11-23  9:33 ` Thomas Gleixner
2012-11-23 13:11   ` Norbert Warmuth
2012-11-28 16:56     ` Joseph Salisbury
2012-11-28 20:37       ` Thomas Gleixner
2012-12-04 19:10   ` tip-bot for Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-8d4516904b39507458bee8115793528e12b1d8dd@git.kernel.org \
    --to=tglx@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=joseph.salisbury@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nwarmuth@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).