From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965355AbbDVOsI (ORCPT ); Wed, 22 Apr 2015 10:48:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55056 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964826AbbDVOsF (ORCPT ); Wed, 22 Apr 2015 10:48:05 -0400 From: Don Zickus To: LKML Cc: Andrew Morton , Ulrich Obergfell , Don Zickus Subject: [PATCH] watchdog: Fix watchdog_nmi_enable_all() Date: Wed, 22 Apr 2015 10:47:49 -0400 Message-Id: <1429714069-176478-1-git-send-email-dzickus@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulrich Obergfell 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 Signed-off-by: Don Zickus --- 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