linux/drivers/leds
Steven Rostedt 50d431e8a1 leds: fix bug with reading NAS SS4200 dmi code
While running randconfg with ktest.pl I stumbled upon this bug:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000003
  IP: [<ffffffff815fe44f>] strstr+0x39/0x86
  PGD 0
  Oops: 0000 [#1] SMP
  last sysfs file:
  CPU 0
  Modules linked in:

  Pid: 1, comm: swapper Not tainted 2.6.37-rc1-test+ #6 DG965MQ/
  RIP: 0010:[<ffffffff815fe44f>]  [<ffffffff815fe44f>] strstr+0x39/0x86
  RSP: 0018:ffff8800797cbd80  EFLAGS: 00010213
  RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffffffffffff
  RDX: 0000000000000000 RSI: ffffffff82eb7ac9 RDI: 0000000000000003
  RBP: ffff8800797cbda0 R08: ffff880000000003 R09: 0000000000030725
  R10: ffff88007d294c00 R11: 0000000000014c00 R12: 0000000000000020
  R13: ffffffff82eb7ac9 R14: ffffffffffffffff R15: ffffffff82eb7b08
  FS:  0000000000000000(0000) GS:ffff88007d200000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 0000000000000003 CR3: 0000000002a1d000 CR4: 00000000000006f0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Process swapper (pid: 1, threadinfo ffff8800797ca000, task ffff8800797d0000)
  Stack:
   00000000000000ba ffffffff82eb7ac9 ffffffff82eb7ab8 00000000000000ba
   ffff8800797cbdf0 ffffffff81e2050f ffff8800797cbdc0 00000000815f913b
   ffff8800797cbe00 ffffffff82eb7ab8 0000000000000000 0000000000000000
  Call Trace:
   [<ffffffff81e2050f>] dmi_matches+0x117/0x154
   [<ffffffff81e205d7>] dmi_check_system+0x3d/0x8d
   [<ffffffff82e1ad25>] ? nas_gpio_init+0x0/0x2c8
   [<ffffffff82e1ad49>] nas_gpio_init+0x24/0x2c8
   [<ffffffff820d750d>] ? wm8350_led_init+0x0/0x20
   [<ffffffff82e1ad25>] ? nas_gpio_init+0x0/0x2c8
   [<ffffffff810022f7>] do_one_initcall+0xab/0x1b2
   [<ffffffff82da749c>] kernel_init+0x248/0x331
   [<ffffffff8100e624>] kernel_thread_helper+0x4/0x10
   [<ffffffff82da7254>] ? kernel_init+0x0/0x331

Found that the nas_led_whitelist dmi_system_id structure array had no
NULL end delimiter, causing the dmi_check_system() loop to read an
undefined entry.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Dave Hansen <dave@sr71.net>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-25 06:50:33 +09:00
..
Kconfig leds: update LP552x support Kconfig and Makefile 2010-11-12 07:55:32 -08:00
Makefile leds: update LP552x support Kconfig and Makefile 2010-11-12 07:55:32 -08:00
dell-led.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
led-class.c led-class: always implement blinking 2010-11-12 07:55:32 -08:00
led-core.c leds: Cleanup various whitespace and code style issues 2008-04-24 23:37:42 +01:00
led-triggers.c led-class: always implement blinking 2010-11-12 07:55:32 -08:00
leds-88pm860x.c leds: Remove auto blink in 88pm860x 2010-10-29 00:29:44 +02:00
leds-adp5520.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-alix2.c leds: leds-alix2c - take port address from MSR 2009-12-16 11:30:09 +00:00
leds-ams-delta.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
leds-atmel-pwm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-bd2802.c leds: Remove owner field from attribute initialization in bd2802 driver 2010-08-05 13:53:35 -07:00
leds-clevo-mail.c Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds 2009-09-26 10:50:47 -07:00
leds-cobalt-qube.c leds: use default-on trigger for Cobalt Qube 2009-12-17 11:38:31 +00:00
leds-cobalt-raq.c leds: leds-cobalt-raq.c - use resource_size() 2009-12-17 11:16:23 +00:00
leds-da903x.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-dac124s085.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-fsg.c IXP4xx: move FSG platform macros to the platform code. 2009-12-05 16:58:40 +01:00
leds-gpio.c drivers/leds/leds-gpio.c: properly initialize return value 2010-11-12 07:55:32 -08:00
leds-h1940.c [ARM] S3C24XX: GPIO: Move gpio functions out of <mach/hardware.h> 2009-05-18 16:25:40 +01:00
leds-hp6xx.c leds: Add suspend/resume to the core class 2009-01-08 17:55:03 +00:00
leds-locomo.c collie: locomo-led change default trigger 2009-11-27 21:07:19 +01:00
leds-lp3944.c i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
leds-lp5521.c leds: driver for National Semiconductor LP5521 chip 2010-11-12 07:55:32 -08:00
leds-lp5523.c leds: driver for National Semiconductors LP5523 chip 2010-11-12 07:55:32 -08:00
leds-lt3593.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-mc13783.c leds: Add mc13783 LED support 2010-05-26 13:07:56 +01:00
leds-net48xx.c leds: Add suspend/resume to the core class 2009-01-08 17:55:03 +00:00
leds-net5501.c leds-net5501: taints kernel, add license 2010-11-05 09:51:56 -07:00
leds-netxbig.c leds: add LED driver for Big Network series LEDs 2010-10-07 14:02:12 -04:00
leds-ns2.c leds: leds-ns2: fix private driver data storage 2010-10-07 14:00:23 -04:00
leds-pca955x.c i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
leds-pca9532.c i2c: Remove all i2c_set_clientdata(client, NULL) in drivers 2010-06-03 11:33:58 +02:00
leds-pwm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-rb532.c leds: Add rb532 LED driver for the User LED 2009-04-06 16:06:26 +01:00
leds-regulator.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-s3c24xx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-ss4200.c leds: fix bug with reading NAS SS4200 dmi code 2010-11-25 06:50:33 +09:00
leds-sunfire.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-wm831x-status.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-wm8350.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
leds-wrap.c leds: Add suspend/resume to the core class 2009-01-08 17:55:03 +00:00
leds.h leds: allow led-drivers to use a variable range of brightness values 2009-04-06 16:06:25 +01:00
ledtrig-backlight.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ledtrig-default-on.c leds: allow led-drivers to use a variable range of brightness values 2009-04-06 16:06:25 +01:00
ledtrig-gpio.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ledtrig-heartbeat.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ledtrig-ide-disk.c leds: allow led-drivers to use a variable range of brightness values 2009-04-06 16:06:25 +01:00
ledtrig-timer.c led-class: always implement blinking 2010-11-12 07:55:32 -08:00