2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 05:04:00 +08:00
linux-next/drivers/misc
Henrique de Moraes Holschuh 24e45bbe69 thinkpad-acpi: fix LED handling on older ThinkPads
The less tested codepaths for LED handling, used on ThinkPads 570, 600e/x,
770e, 770x, A21e, A2xm/p, T20-22, X20 and maybe a few others, would write
data to kernel memory it had no business touching, for leds number 3 and
above.  If one is lucky, that illegal write would cause an OOPS, but
chances are it would silently corrupt a byte.

The problem was introduced in commit af116101, "ACPI: thinkpad-acpi: add
sysfs led class support to thinkpad leds (v3.2)".

Fix the bug by refactoring the entire code to be far more obvious on what
it wants to do.  Also do some defensive "constification".

Issue reported by Karol Lewandowski <lmctlx@gmail.com> (he's an lucky guy
and got an OOPS instead of silent corruption :-) ).

Root cause of the OOPS identified by Adrian Bunk <bunk@kernel.org>.
Thanks, Adrian!

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Tested-by: Karol Lewandowski <lmctlx@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-11 19:13:45 -04:00
..
hdpuftrs drivers: use non-racy method for proc entries creation (2) 2008-04-29 08:06:22 -07:00
ibmasm drivers/misc: replace remaining __FUNCTION__ occurrences 2008-04-29 08:06:03 -07:00
sgi-xp drivers/misc/sgi-xp: replace partid_t with a short 2008-05-13 08:02:23 -07:00
acer-wmi.c Merge branches 'release', 'ejd', 'sony' and 'wmi' into release 2008-03-13 01:59:52 -04:00
asus-laptop.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2008-02-07 09:45:58 -08:00
atmel_pwm.c misc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
atmel_tclib.c atmel_tc library 2008-03-04 13:41:23 +01:00
atmel-ssc.c misc: fix platform driver hotplug/coldplug 2008-04-15 19:35:40 -07:00
eeepc-laptop.c eeepc-laptop: add hwmon fan control 2008-04-29 10:08:07 -04:00
eeprom_93cx6.c eeprom_93cx6: shorten pulse timing to match spec (bis) 2007-07-10 12:41:09 -04:00
enclosure.c [SCSI] ses: fix up functionality after class_device->device conversion 2008-04-22 15:16:29 -05:00
fujitsu-laptop.c fujitsu-laptop: autoload module on Lifebook P1510D 2008-06-06 11:29:09 -07:00
intel_menlow.c intel_menlo: fix build warning 2008-04-29 12:24:24 -04:00
ioc4.c drivers/misc: replace remaining __FUNCTION__ occurrences 2008-04-29 08:06:03 -07:00
Kconfig Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', 'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release 2008-04-30 13:58:00 -04:00
kgdbts.c kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATA 2008-05-28 12:49:57 -05:00
lkdtm.c NULL noise: drivers/misc 2008-03-30 14:18:41 -07:00
Makefile eeepc-laptop: add base driver 2008-04-29 10:08:06 -04:00
msi-laptop.c Remove inclusions of <linux/autoconf.h> 2008-02-06 10:41:00 -08:00
phantom.c Misc, phantom, fix poll 2008-04-29 08:06:02 -07:00
sony-laptop.c drivers/misc: replace remaining __FUNCTION__ occurrences 2008-04-29 08:06:03 -07:00
tc1100-wmi.c tc1100-wmi: Add driver for HP Compaq TC1100 Tablets 2008-02-05 15:07:16 -05:00
thinkpad_acpi.c thinkpad-acpi: fix LED handling on older ThinkPads 2008-06-11 19:13:45 -04:00
tifm_7xx1.c tifm: clear interrupt mask bits before setting them on adapter init 2008-03-10 18:01:18 -07:00
tifm_core.c memstick: initial commit for Sony MemoryStick support 2008-02-09 11:08:34 -08:00