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] [day] [month] [year] [list]
Date:	Sat, 10 May 2014 14:35:38 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	akpm <akpm@...ux-foundation.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values

On Saturday, May 10, 2014 12:47:15 PM Fabian Frederick wrote:
> irq and dma are both resource_size_t (derived from phys_addr_t <-> unsigned)
> 
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@...net.be>

Queued up for 3.16, thanks!

> ---
>  drivers/pnp/resource.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
> index 01712cb..782e822 100644
> --- a/drivers/pnp/resource.c
> +++ b/drivers/pnp/resource.c
> @@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
>  		return 1;
>  
>  	/* check if the resource is valid */
> -	if (*irq < 0 || *irq > 15)
> +	if (*irq > 15)
>  		return 0;
>  
>  	/* check if the resource is reserved */
> @@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
>  		return 1;
>  
>  	/* check if the resource is valid */
> -	if (*dma < 0 || *dma == 4 || *dma > 7)
> +	if (*dma == 4 || *dma > 7)
>  		return 0;
>  
>  	/* check if the resource is reserved */
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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