[lkml]   [2009]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [2.6.31] Memory leak in load_module()?
    On Fri, 2009-09-11 at 19:58 +0900, Tetsuo Handa wrote:
    > OK. Here is the output with CONFIG_FRAME_POINTER=y .
    > Do I need to enable some other debug options?
    > unreferenced object 0xdd7c1718 (size 32):
    > comm "insmod", pid 2859, jiffies 4294757534
    > backtrace:
    > [<c048a210>] create_object+0x135/0x202
    > [<c048a302>] kmemleak_alloc+0x25/0x49
    > [<c04865bd>] kmemleak_alloc_recursive+0x1c/0x22
    > [<c0486e27>] __kmalloc_track_caller+0x66/0xb3
    > [<c0473980>] kstrdup+0x2c/0x4e
    > [<c044716a>] setup_modinfo_srcversion+0x12/0x1b
    > [<c0448725>] load_module+0x866/0x124a
    > [<c0449180>] sys_init_module+0x49/0x1b9
    > [<c0402a24>] sysenter_do_call+0x12/0x22
    > [<ffffffff>] 0xffffffff

    The object above was allocated by kstrdup via setup_modinfo_srcversion
    but the module loading failed and no other kernel part freed the
    mod->filed object. I think it's a real leak but you could try a few
    "echo scan" to make sure it's not just a temporary false positive.

    (the kmemleak branch on git:// has a patch
    which dumps the first few bytes from the object and sometimes this
    helps; I'll send a pull request to Linus sometime today)


     \ /
      Last update: 2009-09-11 13:19    [W:0.037 / U:35.860 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site