Skip to content

Commit

Permalink
ACPICA: Fix for possible error when packages/buffers are passed to me…
Browse files Browse the repository at this point in the history
…thods 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>
  • Loading branch information
Bob Moore authored and Len Brown committed Apr 22, 2008
1 parent a3df4da commit 24a3157
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/utilities/utcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ acpi_ut_copy_esimple_to_isimple(union acpi_object *external_object,
external_object->buffer.length);

internal_object->buffer.length = external_object->buffer.length;

/* Mark buffer data valid */

internal_object->buffer.flags |= AOPOBJ_DATA_VALID;
break;

case ACPI_TYPE_INTEGER:
Expand Down Expand Up @@ -586,6 +590,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);
}
Expand Down

0 comments on commit 24a3157

Please sign in to comment.