mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	len.brown@intel.com
Subject: Re: ACPI boot memory leaks in 2.6.32-rc1/2
Date: Tue, 29 Sep 2009 22:12:07 +0200	[thread overview]
Message-ID: <c4e36d110909291312p115f4d56jd998b65e7ed5b8ba@mail.gmail.com> (raw)
In-Reply-To: <200909291041.31481.bjorn.helgaas@hp.com>

2009/9/29 Bjorn Helgaas <bjorn.helgaas@hp.com>:
> On Tuesday 29 September 2009 03:18:53 am Zdenek Kabelac wrote:
>> My qemu guest seems to be reporting now 46 memleaks  ACPI related.
>
> Thanks a lot for the report!
>
> Can you verify that the patch below fixes these leaks?
>

Yes - leaks are fixed with this patch

>
> commit fff7774a805e392ce258f0342e48cbe682ef2b9b
> Author: Bjorn Helgaas <bjorn.helgaas@hp.com>
> Date:   Tue Sep 29 10:32:19 2009 -0600
>
>    ACPI: fix bus scanning memory leaks
>
>    Free an acpi_get_object_info() buffer when we're finished.  Skip the
>    acpi_get_name() altogether -- it was only used for a printk that was
>    really just for debug anyway.
>
>    Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>    Reported-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>


Reported-and-tested-by: Zdenek Kabelac <zdenek.kabelac@gmail.com>

>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 468921b..14a7481 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -1052,6 +1052,8 @@ static void acpi_device_set_id(struct acpi_device *device)
>                        device->flags.bus_address = 1;
>                }
>
> +               kfree(info);
> +
>                /*
>                 * Some devices don't reliably have _HIDs & _CIDs, so add
>                 * synthetic HIDs to make sure drivers can find them.
> @@ -1325,13 +1327,8 @@ static int acpi_bus_scan(acpi_handle handle, struct acpi_bus_ops *ops,
>                         struct acpi_device **child)
>  {
>        acpi_status status;
> -       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
>        void *device = NULL;
>
> -       acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
> -       printk(KERN_INFO PREFIX "Enumerating devices from [%s]\n",
> -              (char *) buffer.pointer);
> -
>        status = acpi_bus_check_add(handle, 0, ops, &device);
>        if (ACPI_SUCCESS(status))
>                acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX,
>

  reply	other threads:[~2009-09-29 20:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29  9:18 Zdenek Kabelac
2009-09-29 16:41 ` Bjorn Helgaas
2009-09-29 20:12   ` Zdenek Kabelac [this message]
2009-10-02 15:04     ` 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=c4e36d110909291312p115f4d56jd998b65e7ed5b8ba@mail.gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®