[Bug 561151] Re: reproducible oops at startup on thinkpad x61s in acpi_ex_read_data_from_field

Roland Dreier roland at digitalvampire.org
Mon Apr 12 13:35:56 UTC 2010


Looking at
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-lucid.git;a=commitdiff;h=3f80f9e8e30f4759ad0e29d23856126edbfc7b41
which I believe is the only commit between -19 and -20 that actually touches ACPI, I see one thing that is a bit bogus.  In the chunk below (launchpad may mangle the formatting but I hope not):

+               /* allow full data read from EC address space */
+               if (obj_desc->field.region_obj->region.space_id ==
+                       ACPI_ADR_SPACE_EC) {
+                       if (obj_desc->common_field.bit_length > 8)
+                               obj_desc->common_field.access_bit_width =
+                               ACPI_ROUND_UP(obj_desc->common_field.
+                                                       bit_length, 8);
+                               obj_desc->common_field.access_byte_width =
+                               ACPI_DIV_8(obj_desc->common_field.
+                                                       access_bit_width);
+               }

This is a nested if, and the two assignments of rounded things are
indented as if they were supposed to both be consequences of the inner
if.  But the brace is placed after the first if, so the assignment of
ACPI_DIV_8 to the access_byte_width will happen even if bit_length is
not > 8.

I haven't tried building a kernel with that fixed, and I don't know how
this would cause the problem but it does look suspicious.

-- 
reproducible oops at startup on thinkpad x61s in acpi_ex_read_data_from_field
https://bugs.launchpad.net/bugs/561151
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list