public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* mm_alloc()'ed structure leak
@ 2009-02-09 12:18 Catalin Marinas
  2009-02-09 13:12 ` Catalin Marinas
  2009-02-09 14:44 ` Catalin Marinas
  0 siblings, 2 replies; 18+ messages in thread
From: Catalin Marinas @ 2009-02-09 12:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

Hi,

I've noticed on recent kernels (currently 2.6.29-rc3) a memory leak
reported by kmemleak for an mm_struct allocated in mm_alloc(). If that's
a valid leak, it is a pretty serious one.

Basically bash forks and executes a command like "host kernel.org" which
finishes normally but the corresponding mm_struct isn't freed (I get
this consistently every time I run the above command):

unreferenced object 0xcfed4070 (size 368):
  comm "bash", pid 1674, jiffies 421592
  backtrace:
    [<c0082bd4>] kmemleak_alloc+0x140/0x2b0
    [<c007ff2c>] kmem_cache_alloc+0xd0/0x100
    [<c0036980>] mm_alloc+0x14/0x44
    [<c008a99c>] bprm_mm_init+0xc/0x13c
    [<c008ab70>] do_execve+0xa4/0x218
    [<c002718c>] sys_execve+0x34/0x54
    [<c0023e80>] ret_fast_syscall+0x0/0x28

I can't figure out why this structure isn't freed, so any help is
welcomed before I start bisecting. The platform is an ARM one but the
code in question is probably generic.

Thanks.

-- 
Catalin


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-02-11 17:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 12:18 mm_alloc()'ed structure leak Catalin Marinas
2009-02-09 13:12 ` Catalin Marinas
2009-02-09 14:44 ` Catalin Marinas
2009-02-09 15:12   ` Peter Zijlstra
2009-02-09 16:45     ` Peter Zijlstra
2009-02-09 16:47       ` Peter Zijlstra
2009-02-09 17:28         ` Catalin Marinas
2009-02-09 18:26           ` [PATCH] futex: fix reference leak Peter Zijlstra
2009-02-09 18:53             ` Pallipadi, Venkatesh
2009-02-09 18:57               ` [PATCH -v2] " Peter Zijlstra
2009-02-09 20:49                 ` Darren Hart
2009-02-11 12:28                 ` Ingo Molnar
2009-02-11 15:36                   ` [PATCH -v3] " Peter Zijlstra
2009-02-11 15:49                     ` Ingo Molnar
2009-02-11 15:56                       ` Peter Zijlstra
2009-02-11 16:26                         ` Ingo Molnar
2009-02-11 17:10                           ` [PATCH -v4] " Peter Zijlstra
2009-02-11 17:24                             ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox