From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 3.0-rc3 kmemleak reports
Date: Tue, 21 Jun 2011 12:55:50 +0200 [thread overview]
Message-ID: <4E0078B6.1020200@itwm.fraunhofer.de> (raw)
In-Reply-To: <20110621101815.GB10396@1n450.cable.virginmedia.net>
On 06/21/2011 12:18 PM, Catalin Marinas wrote:
> On Tue, Jun 21, 2011 at 12:00:25PM +0200, Bernd Schubert wrote:
>> On 06/21/2011 11:57 AM, Catalin Marinas wrote:
>>> On Tue, Jun 21, 2011 at 11:40:15AM +0200, Bernd Schubert wrote:
>>>> For some reasons I build a kernel with kmemleak support and got a
>>>> few reports.
>>>
>>> Do you know if they appear in 2.6.39 as well?
>>
>> No idea, if it is important I can build a previous kernel version
>
> It would be good, if you have time, as people can at least restrict the
> range of commits to check. It could as well be a kmemleak false
> positive, can't tell for sure. The ACPI reports are in general difficult
> to identify, unless you find some commit that introduced them.
I took a quick glance into get_current_resources() and add_resources()
and it seems to be rather simple to get memory leaks there. In
get_current_resources():
info.res = kmalloc(size, GFP_KERNEL);
=> gdb shows this is our leaking line.
Now in add_resources():
if (!pci_use_crs)
return;
=> First possible leak?
if (res->flags & IORESOURCE_MEM)
root = &iomem_resource;
else if (res->flags & IORESOURCE_IO)
root = &ioport_resource;
else
continue;
=> else branch is a possible leak?
And I think we run into the first leak, as kern.log tells us:
> Jun 20 18:20:00 fslab2 kernel: [ 0.375732] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug
> Jun 20 18:20:00 fslab2 kernel: [ 0.376146] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-03])
Actually that should be simple to fix and I rebooted now with a patch
applied. I have no idea how to convince thunderbird to not wrap lines,
so I will send the patch in a separate mail. Will CC you.
Cheers,
Bernd
prev parent reply other threads:[~2011-06-21 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 9:40 3.0-rc3 kmemleak reports Bernd Schubert
2011-06-21 9:57 ` Catalin Marinas
2011-06-21 10:00 ` Bernd Schubert
2011-06-21 10:18 ` Catalin Marinas
2011-06-21 10:55 ` Bernd Schubert [this message]
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=4E0078B6.1020200@itwm.fraunhofer.de \
--to=bernd.schubert@itwm.fraunhofer.de \
--cc=catalin.marinas@arm.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