All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: Fix watchdog_nmi_enable_all()
@ 2015-04-22 14:47 Don Zickus
  2015-04-22 20:12 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Don Zickus @ 2015-04-22 14:47 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, Ulrich Obergfell, Don Zickus

From: Ulrich Obergfell <uobergfe@redhat.com>

The 'watchdog_user_enabled' variable is only used as an 'interface'
to the /proc/sys/kernel/watchdog parameter. The actual state of the
watchdog is tracked by bits in the 'watchdog_enabled' variable. So,
watchdog_nmi_enable_all() should check the NMI_WATCHDOG_ENABLED bit
in 'watchdog_enabled'.

Signed-off-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
 kernel/watchdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 2316f50..cba2110 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -608,7 +608,7 @@ void watchdog_nmi_enable_all(void)
 {
 	int cpu;
 
-	if (!watchdog_user_enabled)
+	if (!(watchdog_enabled & NMI_WATCHDOG_ENABLED))
 		return;
 
 	get_online_cpus();
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-23 13:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22 14:47 [PATCH] watchdog: Fix watchdog_nmi_enable_all() Don Zickus
2015-04-22 20:12 ` Andrew Morton
2015-04-23  8:30   ` Ulrich Obergfell
2015-04-23 13:19     ` Don Zickus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.