Bug 10670 - BUG: linux-2.6.26-rc1 oops at thinkpad_acpi:led_set_status
Summary: BUG: linux-2.6.26-rc1 oops at thinkpad_acpi:led_set_status
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Henrique de Moraes Holschuh
URL:
Keywords:
Depends on:
Blocks: 10492
  Show dependency tree
 
Reported: 2008-05-11 12:46 UTC by Rafael J. Wysocki
Modified: 2010-10-08 18:19 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.26-rc1
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Object code generated by the compiler (54.16 KB, application/x-compressed-tar)
2008-05-11 21:39 UTC, Henrique de Moraes Holschuh
Details
[PATCH] ACPI: thinkpad-acpi: fix LED handling on older ThinkPads (3.78 KB, patch)
2008-05-14 21:30 UTC, Henrique de Moraes Holschuh
Details | Diff

Description Rafael J. Wysocki 2008-05-11 12:46:24 UTC
Subject    : BUG: linux-2.6.26-rc1 oops at thinkpad_acpi:led_set_status
Submitter  : Karol Lewandowski <lmctlx@gmail.com>
Date       : 2008-05-08 23:12
References : http://marc.info/?l=linux-kernel&m=121028841527994&w=4
Handled-By : Henrique de Moraes Holschuh <hmh@hmh.eng.br>

This entry is being used for tracking a regression from 2.6.25.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Henrique de Moraes Holschuh 2008-05-11 21:37:38 UTC
So far, this looks like a compiler bug.  Here's the data I got from the bug reporter.

Bug shows up when compiling the kernel with no stack frames, and -Os.

Affected GCC version:
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Comment 2 Henrique de Moraes Holschuh 2008-05-11 21:39:20 UTC
Created attachment 16104 [details]
Object code generated by the compiler

The tarball contains two files sent by the reporter of the bug.

fp means frame-pointer.  This thinkpad-acpi does NOT exibit the OOPS.
nofp means no-frame-pointer.  This thinkpad-acpi DOES exibit the OOPS.
Comment 3 Henrique de Moraes Holschuh 2008-05-11 21:41:27 UTC
I request help from someone which understands gcc to verify if it is indeed a compiler bug.
Comment 4 Henrique de Moraes Holschuh 2008-05-14 19:13:19 UTC
Adrian Bunk found the problem: tpacpi_led_state_cache[led] = <something> could be used with led redefined to be (1 << led).  This would overwrite random memory at positions tpacpi_led_state_cache[led] + 0x80/0x40/0x20/0x10/0x08.

A fix will be ready soon.
Comment 5 Henrique de Moraes Holschuh 2008-05-14 21:30:01 UTC
Created attachment 16153 [details]
[PATCH] ACPI: thinkpad-acpi: fix LED handling on older ThinkPads

Please test.
Comment 6 Karol Lewandowski 2008-05-15 06:06:30 UTC
I can't reproduce oops with this patch.  Bug fixed.

Thanks.
Comment 7 Rafael J. Wysocki 2008-05-15 14:46:42 UTC
Regressions list annotation:
References : http://lkml.org/lkml/2008/5/12/12
Comment 8 Rafael J. Wysocki 2008-05-20 15:16:28 UTC
Regressions list annotation:
Patch : http://bugzilla.kernel.org/attachment.cgi?id=16153&action=view
Comment 9 Henrique de Moraes Holschuh 2008-05-20 15:36:21 UTC
Still waiting for merge upstream.
Comment 10 Shaohua 2008-05-28 00:46:22 UTC
mark this as resolved so Len can take it.
Comment 11 Adrian Bunk 2008-06-12 01:29:54 UTC
fix is not in Linus' tree as commit 24e45bbe695719dca8c20e03d386eb6ea86526b5

Note You need to log in before you can comment on or make changes to this bug.