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]
Date:	Fri, 13 Nov 2015 11:52:30 -0800
From:	Guenter Roeck <linux@...ck-us.net>
To:	Andrew Chew <achew@...dia.com>, linux-watchdog@...r.kernel.org
Cc:	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
	abrestic@...omium.org, treding@...dia.com, swarren@...dia.com,
	jimmzhang@...dia.com, wim@...ana.be
Subject: Re: [PATCH] watchdog: tegra: Stop watchdog first if restarting

On 11/09/2015 04:11 PM, Andrew Chew wrote:
> If we need to restart the watchdog due to someone changing the timeout
> interval, stop the watchdog before restarting it.  Otherwise, the new
> timeout doesn't seem to take.
>
> Signed-off-by: Andrew Chew <achew@...dia.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

Some feedback from the maintainers would be helpful, though,
especially if there is some other means to change the timeout
without stopping the watchdog.

Guenter

> ---
>   drivers/watchdog/tegra_wdt.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c
> index 7f97cdd..9ec5760 100644
> --- a/drivers/watchdog/tegra_wdt.c
> +++ b/drivers/watchdog/tegra_wdt.c
> @@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
>   {
>   	wdd->timeout = timeout;
>
> -	if (watchdog_active(wdd))
> +	if (watchdog_active(wdd)) {
> +		tegra_wdt_stop(wdd);
>   		return tegra_wdt_start(wdd);
> +	}
>
>   	return 0;
>   }
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ