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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5d58b64d-e053-9f7f-49fe-682dc87fe817@roeck-us.net>
Date:   Thu, 12 Mar 2020 22:27:07 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Chris Packham <chris.packham@...iedtelesis.co.nz>,
        wim@...ux-watchdog.org
Cc:     linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] watchdog: orion: use 0 for unset heartbeat

On 3/12/20 8:13 PM, Chris Packham wrote:
> If the heartbeat module param is not specified we would get an error
> message
> 
>   watchdog: f1020300.watchdog: driver supplied timeout (4294967295) out of range
>   watchdog: f1020300.watchdog: falling back to default timeout (171)
> 
> This is because we were initialising heartbeat to -1. By removing the
> initialisation (thus letting the C run time initialise it to 0) we
> silence the warning message and the default timeout is still used.
> 
> Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>

Good catch.

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

> ---
>  drivers/watchdog/orion_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
> index 8e6dfe76f9c9..4ddb4ea2e4a3 100644
> --- a/drivers/watchdog/orion_wdt.c
> +++ b/drivers/watchdog/orion_wdt.c
> @@ -52,7 +52,7 @@
>  #define WDT_A370_RATIO		(1 << WDT_A370_RATIO_SHIFT)
>  
>  static bool nowayout = WATCHDOG_NOWAYOUT;
> -static int heartbeat = -1;		/* module parameter (seconds) */
> +static int heartbeat;		/* module parameter (seconds) */
>  
>  struct orion_watchdog;
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ