From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myron Stowe Subject: Re: [PATCH 8/8] ACPICA: Support for external package objects as method arguments Date: Mon, 04 Jun 2007 16:25:37 -0600 Message-ID: <1180995938.5466.3.camel@localhost> References: <1180761344795-git-send-email-len.brown@intel.com> <11807613453368-git-send-email-len.brown@intel.com> <11807613463371-git-send-email-len.brown@intel.com> <1180761346136-git-send-email-len.brown@intel.com> <11807613471928-git-send-email-len.brown@intel.com> <11807613483187-git-send-email-len.brown@intel.com> <1180761348487-git-send-email-len.brown@intel.com> <11807613492873-git-send-email-len.brown@intel.com> <6287ee32952b502c23d54f12895c3895ddbe5013.1180761191.git.len.brown@intel.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: Received: from atlrel6.hp.com ([156.153.255.205]:59468 "EHLO atlrel6.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753007AbXFDWZj (ORCPT ); Mon, 4 Jun 2007 18:25:39 -0400 In-Reply-To: <6287ee32952b502c23d54f12895c3895ddbe5013.1180761191.git.len.brown@intel.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Len Brown Cc: linux-acpi@vger.kernel.org, Bob Moore >>From : Myron Stowe I believe there is an issue with the new 'package' argument type support just submitted upstream. In the routine acpi_ut_create_package_object(), if the ACPI_ALLOCATE_ZEROED() fails then ACPI_FREE(package_desc) is called as part of the cleanup. This should instead be acpi_ut_remove_reference(package_desc) in order to remove the reference acquired from acpi_ut_create_internal_object() [see the routine acpi_ut_create_buffer_object() as an example of proper functionality]. This patch is against the Linux-ized ACPI CA, since I don't have a good way to modify or test the original Intel version. I hope it's small enough that you can easily make the corresponding change to the Intel version. This modification may be used under either the GPL or the BSD-style license used for the Intel ACPI CA. Signed-off-by: Myron Stowe < myron.stowe@hp.com> --- a/drivers/acpi/utilities/utobject.c 2007-06-04 15:49:19.000000000 -0600 +++ b/drivers/acpi/utilities/utobject.c 2007-06-04 15:52:17.000000000 -0600 @@ -177,7 +177,7 @@ package_elements = ACPI_ALLOCATE_ZEROED((acpi_size) (count + 1) * sizeof(void *)); if (!package_elements) { - ACPI_FREE(package_desc); + acpi_ut_remove_reference(package_desc); return_PTR(NULL); } -- Myron Stowe HP Open Source & Linux Org