[3.13.y.z extended stable] Patch "ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Sep 15 22:07:35 UTC 2014

This is a note to let you know that I have just added a patch titled

    ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:


This patch is scheduled to be released in version

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see



>From 3fd50fb54dd900b5daf1bf0b073c00f432b5be49 Mon Sep 17 00:00:00 2001
From: "David E. Box" <david.e.box at linux.intel.com>
Date: Tue, 8 Jul 2014 10:05:52 +0800
Subject: ACPICA: Utilities: Fix memory leak in acpi_ut_copy_iobject_to_iobject

commit 8aa5e56eeb61a099ea6519eb30ee399e1bc043ce upstream.

Adds return status check on copy routines to delete the allocated destination
object if either copy fails. Reported by Colin Ian King on bugs.acpica.org,
Bug 1087.
The last applicable commit:
 Commit: 3371c19c294a4cb3649aa4e84606be8a1d999e61
 Subject: ACPICA: Remove ACPI_GET_OBJECT_TYPE macro

Link: https://bugs.acpica.org/show_bug.cgi?id=1087
Reported-by: Colin Ian King <colin.king at canonical.com>
Signed-off-by: David E. Box <david.e.box at linux.intel.com>
Signed-off-by: Bob Moore <robert.moore at intel.com>
Signed-off-by: Lv Zheng <lv.zheng at intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
 drivers/acpi/acpica/utcopy.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/acpi/acpica/utcopy.c b/drivers/acpi/acpica/utcopy.c
index edff4e6..c66bca1 100644
--- a/drivers/acpi/acpica/utcopy.c
+++ b/drivers/acpi/acpica/utcopy.c
@@ -1001,5 +1001,11 @@ acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc,
 		status = acpi_ut_copy_simple_object(source_desc, *dest_desc);

+	/* Delete the allocated object if copy failed */
+	if (ACPI_FAILURE(status)) {
+		acpi_ut_remove_reference(*dest_desc);
+	}

More information about the kernel-team mailing list