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:	Tue, 26 May 2009 22:57:20 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	ben-linux@...ff.org, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] S3C: beyond ARRAY_SIZE of s3c_gpios

On Wed, 20 May 2009 17:51:07 +0200 Roel Kluin <roel.kluin@...il.com> wrote:

> Do not go beyond ARRAY_SIZE of s3c_gpios
> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> diff --git a/arch/arm/plat-s3c/gpio.c b/arch/arm/plat-s3c/gpio.c
> index d71dd6d..29926c1 100644
> --- a/arch/arm/plat-s3c/gpio.c
> +++ b/arch/arm/plat-s3c/gpio.c
> @@ -28,7 +28,7 @@ static __init void s3c_gpiolib_track(struct s3c_gpio_chip *chip)
>  
>  	gpn = chip->chip.base;
>  	for (i = 0; i < chip->chip.ngpio; i++, gpn++) {
> -		BUG_ON(gpn > ARRAY_SIZE(s3c_gpios));
> +		BUG_ON(gpn >= ARRAY_SIZE(s3c_gpios));
>  		s3c_gpios[gpn] = chip;
>  	}
>  }

umm, OK, but the title and changelog are quite inaccurate.

I rewrote the title to

	s3c: fix check of index into s3c_gpios[]

and rewrote the changelog to

	The check of the s3c_gpios[] index had an off-by-one.

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