Re: struct pid memory leak

From: Dmitry Vyukov
Date: Sat Jan 23 2016 - 13:15:01 EST


On Sat, Jan 23, 2016 at 7:00 PM, Willy Tarreau <w@xxxxxx> wrote:
> Hi Eric, Dmitry,
>
> On Fri, Jan 22, 2016 at 08:50:01AM -0800, Eric Dumazet wrote:
>> CC netdev, as it looks some af_unix issue ...
>>
>> On Fri, 2016-01-22 at 16:08 +0100, Dmitry Vyukov wrote:
>> > Hello,
>> >
>> > The following program causes struct pid memory leak:
>> >
>> > // autogenerated by syzkaller (http://github.com/google/syzkaller)
> (...)
>> > unreferenced object 0xffff8800324af200 (size 112):
>> > comm "syz-executor", pid 18413, jiffies 4295500287 (age 14.321s)
>> > hex dump (first 32 bytes):
>> > 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
>> > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>> > backtrace:
>> > [<ffffffff86315673>] kmemleak_alloc+0x63/0xa0 mm/kmemleak.c:916
>> > [< inline >] kmemleak_alloc_recursive include/linux/kmemleak.h:47
> (...)
>> > On commit 30f05309bde49295e02e45c7e615f73aa4e0ccc2 (Jan 20).
>
> I can't reproduce this with the indicated commit. I'm unsure how/what
> I'm supposed to see. Is a certain config needed ? I've enabled kmemleak
> in my .config but there are too few information here to go further
> unfortunately.


Hi Willy,

I've attached my .config.
Also run this program in a parallel loop. I think it's leaking not
every time, probably some race is involved.

Attachment: .config
Description: Binary data