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]
Date:	Thu, 5 Mar 2009 09:47:13 +0100
From:	Wim Van Sebroeck <wim@...ana.be>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	wim@...ana.be, lkml <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] watchdog: fsl_get_sys_freq() failure not noticed

Hi Roel,

> Maybe it is nicer to do a test like:
> 
> 	if (freq < MAX_FREQ)
> 
> but I don't know what MAX_FREQ should be.
> ------------------------------>8-------------8<---------------------------------
> fsl_get_sys_freq() may return -1 when 'soc' isn't found, but in gef_wdt_probe()
> 'freq' is unsigned, so the test doesn't catch that.
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
> index f0c2b7a..734d980 100644
> --- a/drivers/watchdog/gef_wdt.c
> +++ b/drivers/watchdog/gef_wdt.c
> @@ -269,7 +269,7 @@ static int __devinit gef_wdt_probe(struct of_device *dev,
>  	bus_clk = 133; /* in MHz */
>  
>  	freq = fsl_get_sys_freq();
> -	if (freq > 0)
> +	if (freq != -1)
>  		bus_clk = freq;
>  
>  	/* Map devices registers into memory */

patch added into the linux-2.6-watchdog-next tree.
Will sent it to linus for inclusion into main kernel tree tonight together with some other fixes.

Kind regards,
Wim.

--
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