]> xenbits.xen.org Git - xenclient/kernel.git/commitdiff
Backport upstream patch to fix an ACPI internal exception (obvious when running WMI... origin/HEAD origin/master
authorKamala Narasimhan <kamala.narasimhan@citrix.com>
Fri, 20 Feb 2009 22:48:11 +0000 (17:48 -0500)
committerKamala Narasimhan <kamala.narasimhan@citrix.com>
Fri, 20 Feb 2009 22:48:11 +0000 (17:48 -0500)
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 <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/utilities/utcopy.c

index e2a11ca7f046d4fd7497426dd37b3d0db1c34e1d..246d7bb25b89544429e76b7669cd18a473a66375 100644 (file)
@@ -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);
 }