BUG: linux-2.6.26-rc1 oops at thinkpad_acpi:led_set_status

Previous thread: [PATCH 1/1] mm: define default cpu_to_node by Mike Travis on Thursday, May 8, 2008 - 7:02 pm. (3 messages)

Next thread: [PATCH] ata: ahci: power off unused ports by Kristen Carlson Accardi on Thursday, May 8, 2008 - 7:10 pm. (40 messages)
To: <ibm-acpi-devel@...>
Cc: <linux-kernel@...>
Date: Thursday, May 8, 2008 - 7:12 pm

Hello,

On my Thinkpad T21 executing:

# echo 7 blink > /proc/acpi/ibm/led

on kernel afa26be86b65a7183ceac29bdf1f51d6fc6932f0 (few comits after
rc1) results in following oops:

BUG: unable to handle kernel paging request at d08ed000
IP: [<d08e3534>] :thinkpad_acpi:led_set_status+0xac/0xc3
*pde = 0f81c067 *pte = 00000000
Oops: 0002 [#1] PREEMPT
Modules linked in: nfs lockd nfs_acl sunrpc ipv6 autofs4 nls_iso8859_1 dm_snapshot dm_mirror dm_log thinkpad_acpi hwmon backlight led_class nvram fuse irtty_sir sir_dev irda parport_pc parport snd_cs46xx snd_seq_midi snd_rawmidi rt2500pci rt2x00pci rt2x00lib snd_ac97_codec uhci_hcd eeprom_93cx6 ac97_bus

Pid: 2113, comm: bash Not tainted (2.6.26-rc1-bizet #4)
EIP: 0060:[<d08e3534>] EFLAGS: 00010246 CPU: 0
EIP is at led_set_status+0xac/0xc3 [thinkpad_acpi]
EAX: 00000000 EBX: 00000080 ECX: cf801150 EDX: 00000000
ESI: 00000001 EDI: 00000005 EBP: d08ec660 ESP: cefa1f1c
DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process bash (pid: 2113, ti=cefa1000 task=cf9a91c0 task.ti=cefa1000)
Stack: cfa92588 fffffff4 d08e5028 cfa9258e 00000007 cfa92588 d08e5433 08e9cc08
d08e53d1 cefcbe80 08e9cc08 fffffffb c0190dc7 d08ec660 cec7b840 c0190da2
cefcbe80 c018d5a5 cefa1fa0 00000005 08e9cc08 cefcbe80 08e9cc08 c018d528
Call Trace:
[<d08e5028>] led_write+0x83/0xa1 [thinkpad_acpi]
[<d08e5433>] dispatch_procfs_write+0x62/0x7f [thinkpad_acpi]
[<d08e53d1>] dispatch_procfs_write+0x0/0x7f [thinkpad_acpi]
[<c0190dc7>] proc_file_write+0x25/0x2e
[<c0190da2>] proc_file_write+0x0/0x2e
[<c018d5a5>] proc_reg_write+0x7d/0x90
[<c018d528>] proc_reg_write+0x0/0x90
[<c015ed04>] vfs_write+0x83/0xf6
[<c015f192>] sys_write+0x3c/0x63
[<c0103721>] sysenter_past_esp+0x6a/0x91
=======================
Code: eb 25 ff 34 b5 f0 54 8e d0 53 68 f8 59 8e d0 6a 00 6a 00 ff 35 ec cd 8e d0 e8 65 ec ff ff 83 c4 18 85 c0 74 0f eb 14 85 c0 75 14 <89> 34 9d 00 ce 8e d0 eb 0b b8 fb ff ff f...

To: Karol Lewandowski <lmctlx@...>
Cc: <ibm-acpi-devel@...>, <linux-kernel@...>
Date: Thursday, May 8, 2008 - 11:53 pm

Please send me by private email the acpidump and dmidecode information
for your ThinkPad, I don't have any for the T21. Feel free to
XXXXXX-out the UUID and serial number of your T21 in the dmidecode
output.

The machine was clean after a boot, correct? (no sleeps or other
known-to-be-busted-in-2.6.26 operations before the OOPS?)

Assuming the comments on the LED code from the first ibm-acpi maintainer
are correct, the T20-T22 use the same LED interface, the "LED_OLD"
ibm-acpi codepath. That codepath is indeed NOT tested often, as I don't
have a way to do so. Bugs there wouldn't surprise me too much.

If you try it using the sysfs led class, do you get the same OOPS? (I
expect you to. If you don't, I *need* to know this).

Is it always a problem with the last led (number 7), or other leds also
cause the OOPS?

Also, please try the patch below, and send me the debug output it will
generate.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index 3f28f6e..392c800 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -3867,6 +3867,9 @@ static int led_set_status(unsigned int led, enum led_status_t ledstatus)

int rc = 0;

+ printk(TPACPI_ERR "debug: led %u, status %u, mode %u\n",
+ led, ledstatus, led_supported);
+
switch (led_supported) {
case TPACPI_LED_570:
/* 570 */
@@ -3878,13 +3881,22 @@ static int led_set_status(unsigned int led, enum led_status_t ledstatus)
case TPACPI_LED_OLD:
/* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */
led = 1 << led;
+ printk(TPACPI_ERR "debug: led is now 0x%0X\n", led);
+ printk(TPACPI_ERR "debug: will write A=0x%0X, B=0x%0X\n",
+ led * led_exp_hlbl[ledstatus],
+ led * led_exp_hlcl[ledstatus]);
+
rc = ec_write(TPACPI_LED_E...

To: Henrique de Moraes Holschuh <hmh@...>
Cc: Karol Lewandowski <lmctlx@...>, <ibm-acpi-devel@...>, <linux-kernel@...>
Date: Friday, May 9, 2008 - 3:16 pm

Well, I try to "test" that... actually I try to use it, and see if it
breaks horribly. ;-)

Yes, I get oops in the same place, call stack is different of course.

BUG: unable to handle kernel paging request at d096a000
IP: [<d0960534>] :thinkpad_acpi:led_set_status+0xac/0xc3
*pde = 0f81c067 *pte = 00000000
Oops: 0002 [#1] PREEMPT
Modules linked in: nfs lockd nfs_acl sunrpc ipv6 autofs4 nls_iso8859_1 dm_snapshot dm_mirror dm_log thinkpad_acpi hwmon backlight led_class nvram fuse irtty_sir sir_dev snd_cs46xx snd_seq_midi snd_rawmidi rt2500pci rt2x00pci parport_pc rt2x00lib irda snd_ac97_codec parport uhci_hcd eeprom_93cx6 ac97_bus

Pid: 1253, comm: ktpacpid Not tainted (2.6.26-rc1-bizet #4)
EIP: 0060:[<d0960534>] EFLAGS: 00010246 CPU: 0
EIP is at led_set_status+0xac/0xc3 [thinkpad_acpi]
EAX: 00000000 EBX: 00000080 ECX: cf801150 EDX: 00000000
ESI: 00000000 EDI: cfb891e8 EBP: d096054b ESP: ced1ff9c
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process ktpacpid (pid: 1253, ti=ced1f000 task=cfafd630 task.ti=ced1f000)
Stack: cfb891ec cfbc6fe0 c0126f5f cfbc6fe0 c0127573 ced1ffd0 00000000 c012761d
00000000 cfafd630 c01298b2 ced1ffc8 ced1ffc8 cfbc6fe0 00000000 c01297ff
c01297c9 00000000 c0104293 cec14dec 00000000 00000000 00000000 4efbfdff
Call Trace:
[<c0126f5f>] run_workqueue+0x83/0x10e
[<c0127573>] worker_thread+0x0/0xb4
[<c012761d>] worker_thread+0xaa/0xb4
[<c01298b2>] autoremove_wake_function+0x0/0x2d
[<c01297ff>] kthread+0x36/0x5b
[<c01297c9>] kthread+0x0/0x5b
[<c0104293>] kernel_thread_helper+0x7/0x10
=======================
Code: eb 25 ff 34 b5 f0 24 96 d0 53 68 f8 29 96 d0 6a 00 6a 00 ff 35 ec 9d 96 d0 e8 65 ec ff ff 83 c4 18 85 c0 74 0f eb 14 85 c0 75 14 <89> 34 9d 00 9e 96 d0 eb 0b b8 fb ff ff ff eb 04 31 c0 eb ec 5b
EIP: [<d0960534>] led_set_status+0xac/0xc3 [thinkpad_acpi] SS:ESP 0068:ced1ff9c

Leds 1-6 are ok, i.e. they do change state (on/off) and don't cause
ill effects.

...

Previous thread: [PATCH 1/1] mm: define default cpu_to_node by Mike Travis on Thursday, May 8, 2008 - 7:02 pm. (3 messages)

Next thread: [PATCH] ata: ahci: power off unused ports by Kristen Carlson Accardi on Thursday, May 8, 2008 - 7:10 pm. (40 messages)