[<prev] [next>] [day] [month] [year] [list]
Message-ID: <BANLkTimWGDSWUzpXXrF1Xu2_=wu-y9J_HA@mail.gmail.com>
Date: Sun, 17 Apr 2011 12:11:17 +0800
From: Hillf Danton <dhillf@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Don Zickus <dzickus@...hat.com>
Subject: [PATCH] watchdog: disable nmi perf event in the error path of
enabling watchdog
In corner cases where softlockup watchdog is not setup successfully,
the relevant nmi perf event for hardlockup watchdog could be disabled,
then the status of the underlying hardware remains unchanged.
Signed-off-by: Hillf Danton <dhillf@...il.com>
---
--- a/kernel/watchdog.c 2011-03-30 03:09:48.000000000 +0800
+++ b/kernel/watchdog.c 2011-04-17 11:58:10.000000000 +0800
@@ -430,9 +430,12 @@ static int watchdog_enable(int cpu)
p = kthread_create(watchdog, (void *)(unsigned long)cpu, "watchdog/%d", cpu);
if (IS_ERR(p)) {
printk(KERN_ERR "softlockup watchdog for %i failed\n", cpu);
- if (!err)
+ if (!err) {
/* if hardlockup hasn't already set this */
err = PTR_ERR(p);
+ /* and disable the perf event */
+ watchdog_nmi_disable(cpu);
+ }
goto out;
}
kthread_bind(p, cpu);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists