From: Kamala Narasimhan Date: Fri, 20 Feb 2009 22:48:11 +0000 (-0500) Subject: Backport upstream patch to fix an ACPI internal exception (obvious when running WMI... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ed883e9aa09352ff2ff72e5313cfdf8a7f46f5cc;p=xenclient%2Fkernel.git Backport upstream patch to fix an ACPI internal exception (obvious when running WMI on Dell). Patch details as is from upstream - ACPICA: Fix for possible error when packages/buffers are passed to methods externally Fixed a problem where buffer and package objects passed as arguments to a control method via the external AcpiEvaluateObject interface could cause an AE_AML_INTERNAL exception depending on the order and type of operators executed by the target control method. Signed-off-by: Bob Moore Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index e2a11ca7..246d7bb2 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -502,7 +502,11 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object, external_object->buffer.length); internal_object->buffer.length = external_object->buffer.length; - break; + + /* Mark buffer data valid */ + + internal_object->buffer.flags |= AOPOBJ_DATA_VALID; + break; case ACPI_TYPE_INTEGER: @@ -577,6 +581,10 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object, } } + /* Mark package data valid */ + + package_object->package.flags |= AOPOBJ_DATA_VALID; + *internal_object = package_object; return_ACPI_STATUS(status); }