linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Myron Stowe <myron.stowe@hp.com>
To: Len Brown <len.brown@intel.com>
Cc: linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: Re: [PATCH 8/8] ACPICA: Support for external package objects as method arguments
Date: Mon, 04 Jun 2007 16:25:37 -0600	[thread overview]
Message-ID: <1180995938.5466.3.camel@localhost> (raw)
In-Reply-To: <6287ee32952b502c23d54f12895c3895ddbe5013.1180761191.git.len.brown@intel.com>

>From : Myron Stowe <myron.stowe@hp.com>

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


  parent reply	other threads:[~2007-06-04 22:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-02  5:15 ACPI patches for 2.6.22-rc3 Len Brown
     [not found] ` <0efabac9b7c8535eeb199d2f16d3eb44dc4761b2.1180761191.git.len.brown@intel.com>
2007-06-02  5:15   ` [PATCH 1/8] ACPICA: allow Load(OEMx) tables Len Brown
     [not found]   ` <ae00d812436dc968f4a5dea7757b6a94910b6dc4.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 3/8] ACPI: extend "acpi_osi=" boot option Len Brown
     [not found]   ` <f507654d450d329c81a70eec0096d5dfe67802ec.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 4/8] ACPI: Make _OSI(Linux) a special case Len Brown
     [not found]   ` <dd272b5716a54afa33a69f2241284d8ec60b7892.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 5/8] ACPI: add __init to acpi_initialize_subsystem() Len Brown
     [not found]   ` <cc4c24e115ca7bc2e4ec74d70bcb8fda1d1a8df8.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 6/8] ACPI: thinkpad-acpi: do not use named sysfs groups Len Brown
     [not found]   ` <8ff6f48d99a0351bcc9ceab422042ef9d3bad9aa.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 7/8] ACPI: Section mismatch ... acpi_map_pxm_to_node Len Brown
     [not found]   ` <6287ee32952b502c23d54f12895c3895ddbe5013.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 8/8] ACPICA: Support for external package objects as method arguments Len Brown
2007-06-04 22:25     ` Myron Stowe [this message]
2007-06-18  4:53       ` Len Brown
     [not found]   ` <68ccfaa8222f2a26f0689fad9e8c0c3f4c19f599.1180761191.git.len.brown@intel.com>
2007-06-02  5:15     ` [PATCH 2/8] ACPI: thermal: Replace pointer with name in trip_points Len Brown
2007-06-04 16:30     ` Thomas Renninger
2007-06-18  4:38       ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1180995938.5466.3.camel@localhost \
    --to=myron.stowe@hp.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).