lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1464674890-10512-2-git-send-email-fu.wei@linaro.org>
Date:	Tue, 31 May 2016 14:08:08 +0800
From:	fu.wei@...aro.org
To:	wim@...ana.be, linux@...ck-us.net, panand@...hat.com
Cc:	linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linaro-acpi@...ts.linaro.org,
	timur@...eaurora.org, dyoung@...hat.com, graeme.gregory@...aro.org,
	al.stone@...aro.org, jcm@...hat.com, Suravee.Suthikulpanit@....com,
	Fu Wei <fu.wei@...aro.org>
Subject: [PATCH 1/3] watchdog: skip min and max timeout validity check when max_hw_heartbeat_ms is defined

From: Pratyush Anand <panand@...hat.com>

When max_hw_heartbeat_ms has a none zero value, max_timeout is not used.
So it's value can be 0. In such case if a driver uses min_timeout
functionality, then check will always fail.

This patch fixes above issue.

Signed-off-by: Pratyush Anand <panand@...hat.com>
Signed-off-by: Fu Wei <fu.wei@...aro.org>
---
 drivers/watchdog/watchdog_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index 7c3ba58..65e62d1 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -88,7 +88,7 @@ static void watchdog_check_min_max_timeout(struct watchdog_device *wdd)
 	 * Check that we have valid min and max timeout values, if
 	 * not reset them both to 0 (=not used or unknown)
 	 */
-	if (wdd->min_timeout > wdd->max_timeout) {
+	if (!wdd->max_hw_heartbeat_ms && wdd->min_timeout > wdd->max_timeout) {
 		pr_info("Invalid min and max timeout values, resetting to 0!\n");
 		wdd->min_timeout = 0;
 		wdd->max_timeout = 0;
-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ