diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-09-12 12:04:37 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 12:04:37 +0100 |
commit | 87d721ad7a37b7650dd710c88dd5c6a5bf9fe996 (patch) | |
tree | 869d633803eb7c429624d3bd16a6117816849763 /drivers/acpi/acpica/dsopcode.c | |
parent | ddd559b13f6d2fe3ad68c4b3f5235fd3c2eae4e3 (diff) | |
parent | b7cfda9fc3d7aa60cffab5367f2a72a4a70060cd (diff) |
Merge branch 'master' into devel
Diffstat (limited to 'drivers/acpi/acpica/dsopcode.c')
-rw-r--r-- | drivers/acpi/acpica/dsopcode.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c index 584d766e6f1..b79978f7bc7 100644 --- a/drivers/acpi/acpica/dsopcode.c +++ b/drivers/acpi/acpica/dsopcode.c @@ -397,6 +397,30 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) status = acpi_ds_execute_arguments(node, acpi_ns_get_parent_node(node), extra_desc->extra.aml_length, extra_desc->extra.aml_start); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* Validate the region address/length via the host OS */ + + status = acpi_os_validate_address(obj_desc->region.space_id, + obj_desc->region.address, + (acpi_size) obj_desc->region.length, + acpi_ut_get_node_name(node)); + + if (ACPI_FAILURE(status)) { + /* + * Invalid address/length. We will emit an error message and mark + * the region as invalid, so that it will cause an additional error if + * it is ever used. Then return AE_OK. + */ + ACPI_EXCEPTION((AE_INFO, status, + "During address validation of OpRegion [%4.4s]", + node->name.ascii)); + obj_desc->common.flags |= AOPOBJ_INVALID; + status = AE_OK; + } + return_ACPI_STATUS(status); } |