* [PATCH] watchdog: Disable nmi perf event in the error path of enabling watchdog
@ 2011-04-21 8:22 Don Zickus
0 siblings, 0 replies; 2+ messages in thread
From: Don Zickus @ 2011-04-21 8:22 UTC (permalink / raw)
To: LKML; +Cc: Andrew Morton, Hillf Danton, Don Zickus
From: Hillf Danton <dhillf@gmail.com>
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.
[ also if the kthread doesn't start, the hrtimer won't run and the
hardlockup detector will falsely fire ]
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
kernel/watchdog.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 140dce7..14733d4 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -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);
--
1.7.4.2
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] watchdog: disable nmi perf event in the error path of enabling watchdog
@ 2011-04-17 4:11 Hillf Danton
0 siblings, 0 replies; 2+ messages in thread
From: Hillf Danton @ 2011-04-17 4:11 UTC (permalink / raw)
To: LKML; +Cc: Don Zickus
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@gmail.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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-21 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 8:22 [PATCH] watchdog: Disable nmi perf event in the error path of enabling watchdog Don Zickus
-- strict thread matches above, loose matches on Subject: below --
2011-04-17 4:11 [PATCH] watchdog: disable " Hillf Danton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®