Index: utresrc.c =================================================================== --- drivers/bus/acpi/acpica/utilities/utresrc.c (revision 74509) +++ drivers/bus/acpi/acpica/utilities/utresrc.c (working copy) @@ -472,7 +472,7 @@ * The absolute minimum resource template is one EndTag descriptor. * However, we will treat a lone EndTag as just a simple buffer. */ - if (AmlLength < sizeof (AML_RESOURCE_END_TAG)) + if (AmlLength <= sizeof (AML_RESOURCE_END_TAG)) { return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); } @@ -505,8 +505,8 @@ if (UserFunction) { - Status = UserFunction (Aml, Length, Offset, - ResourceIndex, Context); + Status = UserFunction ( + Aml, Length, Offset, ResourceIndex, Context); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -543,15 +543,10 @@ *Context = Aml; } - /* Check if buffer is defined to be longer than the resource length */ - - if (AmlLength > (Offset + Length)) - { - return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); - } - - /* Normal exit */ - + /* + * Normal exit. Note: We allow the buffer to be larger than + * the resource template, as long as the END_TAG exists. + */ return_ACPI_STATUS (AE_OK); }