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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Apr 2008 08:11:10 +0200
From:	Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
To:	Roel Kluin <12o3l@...cali.nl>
CC:	<rmk@....linux.org.uk>,
	Linux-arm <linux-arm-kernel@...ts.arm.linux.org.uk>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ARM: am79c961a: platform_get_irq() may return signed unnoticed

Hello,

Roel Kluin wrote:
> dev->irq is unsigned, platform_get_irq() may return signed unnoticed
> 
> Signed-off-by: Roel Kluin <12o3l@...cali.nl>
> ---
> diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
> index ba6bd03..a637910 100644
> --- a/drivers/net/arm/am79c961a.c
> +++ b/drivers/net/arm/am79c961a.c
> @@ -693,11 +693,15 @@ static int __init am79c961_probe(struct platform_device *pdev)
>  	 * done by the ether bootp loader.
>  	 */
>  	dev->base_addr = res->start;
> -	dev->irq = platform_get_irq(pdev, 0);
> +	ret = platform_get_irq(pdev, 0);
>  
> -	ret = -ENODEV;
> -	if (dev->irq < 0)
> +	if (ret < 0) {
> +		ret = -ENODEV;
>  		goto nodev;
> +	}
> +	dev->irq = ret;
> +
> +	ret = -ENODEV;
>  	if (!request_region(dev->base_addr, 0x18, dev->name))
>  		goto nodev;
For me the change looks fine.

Best regards
Uwe

-- 
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
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