From c243528a18ae423700c1e6d41e027b18907189eb Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> References: <410c2f0190f74c35505beda6ff3f2da7819f8bac.1164352285.git.len.brown@intel.com> From: Robert Moore Date: Tue, 14 Nov 2006 20:04:09 +0300 Subject: [PATCH 7/65] ACPICA: fix for object premature deletion Reply-To: Len Brown Organization: Intel Open Source Technology Center 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 --- drivers/acpi/utilities/utcopy.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c index 5e1a80d..5c38276 100644 --- a/drivers/acpi/utilities/utcopy.c +++ b/drivers/acpi/utilities/utcopy.c @@ -719,6 +719,15 @@ acpi_ut_copy_simple_object(union acpi_op 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; -- 1.4.4.1