diff options
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 e8b86a0baad0..83b12a9afa32 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, | |||
155 | /* Convert and validate the device handle */ | 155 | /* Convert and validate the device handle */ |
156 | 156 | ||
157 | node = acpi_ns_map_handle_to_node(device); | 157 | node = acpi_ns_map_handle_to_node(device); |
158 | if (!node) { | 158 | if (!node || |
159 | ((node->type != ACPI_TYPE_DEVICE) && | ||
160 | (node->type != ACPI_TYPE_PROCESSOR) && | ||
161 | (node->type != ACPI_TYPE_THERMAL) && | ||
162 | (node != acpi_gbl_root_node))) { | ||
159 | status = AE_BAD_PARAMETER; | 163 | status = AE_BAD_PARAMETER; |
160 | goto unlock_and_exit; | 164 | goto unlock_and_exit; |
161 | } | 165 | } |
@@ -178,6 +182,13 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
178 | 182 | ||
179 | if (handler_obj->address_space.space_id == space_id) { | 183 | if (handler_obj->address_space.space_id == space_id) { |
180 | 184 | ||
185 | /* Handler must be the same as the installed handler */ | ||
186 | |||
187 | if (handler_obj->address_space.handler != handler) { | ||
188 | status = AE_BAD_PARAMETER; | ||
189 | goto unlock_and_exit; | ||
190 | } | ||
191 | |||
181 | /* Matched space_id, first dereference this in the Regions */ | 192 | /* Matched space_id, first dereference this in the Regions */ |
182 | 193 | ||
183 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, | 194 | ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, |