diff options
author | Len Brown <len.brown@intel.com> | 2009-07-28 00:42:38 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-07-28 00:42:38 +0200 |
commit | 7cb7f45c7feef43c8f71f5cfedfc0b19be2142f7 (patch) | |
tree | c35f1815fefc6460c204473a738785d6da1cb642 /drivers/acpi/acpica/dsopcode.c | |
parent | Linux 2.6.31-rc4 (diff) | |
download | linux-7cb7f45c7feef43c8f71f5cfedfc0b19be2142f7.tar.xz linux-7cb7f45c7feef43c8f71f5cfedfc0b19be2142f7.zip |
Revert "ACPICA: Remove obsolete acpi_os_validate_address interface"
This reverts commit f9ca058430333c9a24c5ca926aa445125f88df18.
which caused a regression:
http://bugzilla.kernel.org/show_bug.cgi?id=13620
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
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 584d766e6f12..b79978f7bc71 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); } |