Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281378

Re: memory leak in alloc_huge_page

From Mike Kravetz <mike.kravetz@oracle.com>
Newsgroups linux.kernel
Subject Re: memory leak in alloc_huge_page
Date 2015-12-02 02:00 +0100
Message-ID <qB3W2-8uw-3@gated-at.bofh.it> (permalink)
References <qATN0-2eD-15@gated-at.bofh.it> <qAYjE-4To-3@gated-at.bofh.it> <qAZ62-5u6-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/01/2015 11:45 AM, Dmitry Vyukov wrote:
> On Tue, Dec 1, 2015 at 7:52 PM, Mike Kravetz <mike.kravetz@oracle.com> wrote:
>> On 12/01/2015 06:04 AM, Dmitry Vyukov wrote:

>>> There seems to be another leak if nrg is not NULL on this path, but
>>> it's not what happens in my case since the WARNING does not fire.
>>
>> If nrg is not NULL, then it was added to the resv map and 'should' be
>> free'ed when the map is free'ed.  This is not optimal, but I do not
>> think it would lead to a leak.  I'll take a close look at this code
>> with an emphasis on the leak you discovered.
> 
> 
> Hi Mike,
> 
> Note that it's not just a leak report, it is an actual leak. You
> should be able to reproduce it.
> 

OK, finally found the bug which is in region_del().  It does not correctly
handle a "placeholder" region descriptor that is left after an aborted
operation when the start of the region to be deleted is for the same page.

I will have a patch shortly, after some testing.

-- 
Mike Kravetz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

memory leak in alloc_huge_page Dmitry Vyukov <dvyukov@google.com> - 2015-12-01 15:10 +0100
  Re: memory leak in alloc_huge_page Mike Kravetz <mike.kravetz@oracle.com> - 2015-12-01 20:00 +0100
    Re: memory leak in alloc_huge_page Dmitry Vyukov <dvyukov@google.com> - 2015-12-01 20:50 +0100
      Re: memory leak in alloc_huge_page Mike Kravetz <mike.kravetz@oracle.com> - 2015-12-02 02:00 +0100

csiph-web