diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-07-27 14:27:06 -0400 |
commit | 20f99dcf417a28089ef6c877ae97f5dec2eab435 (patch) | |
tree | b4fe1f3e429d6a82ddaaa8e12899da630cfa8a63 /drivers/acpi/events/evxfregn.c | |
parent | dd2f5538a157bda68bfa8efb39feaaccdda9e74e (diff) | |
parent | 64821324ca49f24be1a66f2f432108f96a24e596 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'drivers/acpi/events/evxfregn.c')
-rw-r--r-- | drivers/acpi/events/evxfregn.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c index e8b86a0baad..83b12a9afa3 100644 --- a/drivers/acpi/events/evxfregn.c +++ b/drivers/acpi/events/evxfregn.c @@ -155,7 +155,11 @@ acpi_remove_address_space_handler(acpi_handle device, /* Convert and validate the device handle */ node = acpi_ns_map_handle_to_node(device); - if (!node) { + if (!node || + ((node->type != ACPI_TYPE_DEVICE) && + (node->type != ACPI_TYPE_PROCESSOR) && + (node->type != ACPI_TYPE_THERMAL) && + (node != acpi_gbl_root_node))) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } @@ -178,6 +182,13 @@ acpi_remove_address_space_handler(acpi_handle device, if (handler_obj->address_space.space_id == space_id) { + /* Handler must be the same as the installed handler */ + + if (handler_obj->address_space.handler != handler) { + status = AE_BAD_PARAMETER; + goto unlock_and_exit; + } + /* Matched space_id, first dereference this in the Regions */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |