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: <a9de6e68-baac-4fe7-a05c-ca4d79ddd84e@roeck-us.net>
Date: Wed, 21 Aug 2024 16:28:02 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Judith Mendez <jm@...com>
Cc: Wim Van Sebroeck <wim@...ux-watchdog.org>,
	linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: rti_wdt: Allow timeout config with timeout-sec

On Wed, Aug 21, 2024 at 03:19:35PM -0500, Judith Mendez wrote:
> Currently rti_wdt does not allow timeout to be configured
> via DT property timeout-sec, so fix watchdog_init_timeout
> to be able to use timeout-sec.
> 
> Signed-off-by: Judith Mendez <jm@...com>
> ---
>  drivers/watchdog/rti_wdt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
> index 8e1be7ba01039..7260c67e60a25 100644
> --- a/drivers/watchdog/rti_wdt.c
> +++ b/drivers/watchdog/rti_wdt.c
> @@ -332,7 +332,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
>  		memunmap(vaddr);
>  	}
>  
> -	watchdog_init_timeout(wdd, heartbeat, dev);
> +	wdd->timeout = heartbeat;

The proper fix would be to initialize the 'heartbeat' variable with 0,
set wdt->timeout to DEFAULT_HEARTBEAT, and to keep passing 'heartbeat'
to watchdog_init_timeout(). That used to be done but was explicitly
changed in an earlier commit, presumably on purpose. I am not inclined
to accept a (partial) revert unless the author of commit 5527483f confirms
that this is acceptable and desirable. Otherwise we'll just end up in an
edit war, which I really don't want to get into.

Guenter
`

> +	watchdog_init_timeout(wdd, 0, dev);
>  
>  	ret = watchdog_register_device(wdd);
>  	if (ret) {
> 
> base-commit: 860bbe8e618fd62446309e286ab4a83d38201c0a
> -- 
> 2.46.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ