All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] watchdog: fix watchdog_nmi_enable_all()
@ 2015-04-17  9:26 Ulrich Obergfell
  2015-04-17  9:26 ` [RFC PATCH 1/1] " Ulrich Obergfell
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Obergfell @ 2015-04-17  9:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: dzickus, uobergfe

It appears that this issue has been introduced during the recent merges.
It is related to the patch series from https://lkml.org/lkml/2015/2/5/624 and
http://lkml.kernel.org/r/1416251225-17721-12-git-send-email-eranian@google.com

watchdog_nmi_enable_all() needs to check a bit in watchdog_enabled to determine
whether the NMI watchdog is running, not the content of watchdog_user_enabled.

The attached [RFC PATCH 1/1] has undergone minimal testing only.

Ulrich Obergfell (1):
  watchdog: fix watchdog_nmi_enable_all()

 kernel/watchdog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.7.11.7


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

* [RFC PATCH 1/1] watchdog: fix watchdog_nmi_enable_all()
  2015-04-17  9:26 [RFC PATCH 0/1] watchdog: fix watchdog_nmi_enable_all() Ulrich Obergfell
@ 2015-04-17  9:26 ` Ulrich Obergfell
  2015-04-17 15:40   ` Don Zickus
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Obergfell @ 2015-04-17  9:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: dzickus, uobergfe

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>
---
 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();
-- 
1.7.11.7


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

* Re: [RFC PATCH 1/1] watchdog: fix watchdog_nmi_enable_all()
  2015-04-17  9:26 ` [RFC PATCH 1/1] " Ulrich Obergfell
@ 2015-04-17 15:40   ` Don Zickus
  0 siblings, 0 replies; 3+ messages in thread
From: Don Zickus @ 2015-04-17 15:40 UTC (permalink / raw)
  To: Ulrich Obergfell; +Cc: linux-kernel

On Fri, Apr 17, 2015 at 11:26:36AM +0200, Ulrich Obergfell wrote:
> 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'.

Looks good.  I'll respin this and send to Andrew on Monday.

Cheers,
Don

> 
> Signed-off-by: Ulrich Obergfell <uobergfe@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();
> -- 
> 1.7.11.7
> 

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

end of thread, other threads:[~2015-04-17 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17  9:26 [RFC PATCH 0/1] watchdog: fix watchdog_nmi_enable_all() Ulrich Obergfell
2015-04-17  9:26 ` [RFC PATCH 1/1] " Ulrich Obergfell
2015-04-17 15:40   ` 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.