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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Dec 2011 08:03:00 +1100
From:	NeilBrown <neilb@...e.de>
To:	Randy Dunlap <rdunlap@...otime.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, rpurdie@...ys.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] leds-tca6507: allow driver to compile when GPIOLIB
 is not available.

On Tue, 20 Dec 2011 12:26:51 -0800 Randy Dunlap <rdunlap@...otime.net> wrote:

> On 12/20/2011 12:16 PM, Randy Dunlap wrote:
> > On 12/19/2011 09:44 PM, NeilBrown wrote:
> >> This driver can configure the outputs as GPIO line instead of LEDs.  But
> >> that only works if GPIOLIB is available.  So make that code conditional
> >> on the library's availability.
> >>
> >> Also remove the 'teardown' callback as it is never called and should
> >> never be needed.
> >>
> >> Signed-off-by: NeilBrown <neilb@...e.de>
> > 
> > Thanks.  This builds.
> > 
> > Acked-by: Randy Dunlap <rdunlap@...otime.net>
> 
> Neil,
> You might want to check this also:
> 
> drivers/leds/leds-tca6507.c:358:17: warning: array subscript is above array bounds
> drivers/leds/leds-tca6507.c:357:17: warning: array subscript is above array bounds
> 
> 

Argh..

diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
index 75dc5e4..ce20ab7 100644
--- a/drivers/leds/leds-tca6507.c
+++ b/drivers/leds/leds-tca6507.c
@@ -349,7 +349,7 @@ static int led_prepare(struct tca6507_led *led)
 			return 0;
 		}
 
-		for (i = MASTER; i >= BANK0; i++) {
+		for (i = MASTER; i >= BANK0; i--) {
 			int d;
 			if (tca->bank[i].level == level ||
 			    tca->bank[i].level_use == 0) {

That loop used to go up..

I might just go an re-review all the code.  And repeat the tests.

Thanks a lot.

NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists