Commit 2843ae77 authored by Bob Moore's avatar Bob Moore Committed by Andi Kleen

ACPICA: Fix memory leak when deleting thermal/processor objects

Fixes a possible memory leak when thermal and processor objects
are deleted. Any associated notify handlers (and objects) were
not being deleted. Fiodor Suietov. BZ 506

http://www.acpica.org/bugzilla/show_bug.cgi?id=506Signed-off-by: default avatarFiodor Suietov <fiodor.f.suietov@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
parent b635acec
...@@ -135,6 +135,10 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) ...@@ -135,6 +135,10 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
obj_pointer = object->package.elements; obj_pointer = object->package.elements;
break; break;
/*
* These objects have a possible list of notify handlers.
* Device object also may have a GPE block.
*/
case ACPI_TYPE_DEVICE: case ACPI_TYPE_DEVICE:
if (object->device.gpe_block) { if (object->device.gpe_block) {
...@@ -142,9 +146,14 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) ...@@ -142,9 +146,14 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
gpe_block); gpe_block);
} }
/* Walk the handler list for this device */ /*lint -fallthrough */
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
/* Walk the notify handler list for this object */
handler_desc = object->device.handler; handler_desc = object->common_notify.handler;
while (handler_desc) { while (handler_desc) {
next_desc = handler_desc->address_space.next; next_desc = handler_desc->address_space.next;
acpi_ut_remove_reference(handler_desc); acpi_ut_remove_reference(handler_desc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment