From: Fiodor Suietov Date: Fri, 2 Feb 2007 16:48:18 +0000 (+0300) Subject: ACPICA: fix for object premature deletion X-Git-Tag: v2.6.21-rc1~92^2~32^2^2~9^2~82 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b366e2fe1b68bd9af55caf166eaaf0609ba18a9;p=linux-2.6 ACPICA: fix for object premature deletion Fix for object premature deletion after CopyObject on Operation Region (BZ 350) Signed-off-by: Bob Moore Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 5e1a80d1bc..5c38276a3f 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -719,6 +719,15 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, acpi_ut_add_reference(source_desc->reference.object); break; + case ACPI_TYPE_REGION: + /* + * We copied the Region Handler, so we now must add a reference + */ + if (dest_desc->region.handler) { + acpi_ut_add_reference(dest_desc->region.handler); + } + break; + default: /* Nothing to do for other simple objects */ break;