25 Oct, 2014

1 commit


26 Aug, 2014

1 commit


07 Jun, 2014

1 commit

  • The memory allocation stack trace is not always useful for debugging a
    memory leak (e.g. radix_tree_preload). This function, when called,
    updates the stack trace for an already allocated object.

    Signed-off-by: Catalin Marinas
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Catalin Marinas
     

04 Apr, 2014

2 commits

  • Update Documentatin/kmemleak.txt to reflect the following changes:

    Commit b69ec42b1b19 ("Kconfig: clean up the long arch list for the
    DEBUG_KMEMLEAK config option") made it so that we can't check supported
    architectures by read Kconfig.debug.

    Commit 85d3a316c71 ("kmemleak: use rbtree instead of prio tree")
    converted kmemleak to use rbtree instead of prio tree.

    Signed-off-by: Wang YanQing
    Cc: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wang YanQing
     
  • Currently if kmemleak is disabled, the kmemleak objects can never be
    freed, no matter if it's disabled by a user or due to fatal errors.

    Those objects can be a big waste of memory.

    OBJS ACTIVE USE OBJ SIZE SLABS OBJ/SLAB CACHE SIZE NAME
    1200264 1197433 99% 0.30K 46164 26 369312K kmemleak_object

    With this patch, after kmemleak was disabled you can reclaim memory
    with:

    # echo clear > /sys/kernel/debug/kmemleak

    Also inform users about this with a printk.

    Signed-off-by: Li Zefan
    Acked-by: Catalin Marinas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     

03 Dec, 2011

1 commit

  • This patch adds kmemleak callbacks from the percpu allocator, reducing a
    number of false positives caused by kmemleak not scanning such memory
    blocks. The percpu chunks are never reported as leaks because of current
    kmemleak limitations with the __percpu pointer not pointing directly to
    the actual chunks.

    Reported-by: Huajun Li
    Acked-by: Christoph Lameter
    Acked-by: Tejun Heo
    Signed-off-by: Catalin Marinas

    Catalin Marinas
     

16 Jun, 2011

1 commit

  • Instead of listing the architectures that are supported by
    kmemleak in Documentation/kmemleak.txt, just refer people to
    the list of supported architecutures in lib/Kconfig.debug so
    that Documentation/kmemleak.txt does not need more updates
    for this.

    Signed-off-by: Maxin B. John
    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Maxin B. John
     

05 Apr, 2011

1 commit


08 Sep, 2009

1 commit

  • In an ideal world your kmemleak output will be small, when its
    not (usually during initial bootup) you can use the clear command
    to ingore previously reported and unreferenced kmemleak objects. We
    do this by painting all currently reported unreferenced objects grey.
    We paint them grey instead of black to allow future scans on the same
    objects as such objects could still potentially reference newly
    allocated objects in the future.

    To test a critical section on demand with a clean
    /sys/kernel/debug/kmemleak you can do:

    echo clear > /sys/kernel/debug/kmemleak
    test your kernel or modules
    echo scan > /sys/kernel/debug/kmemleak

    Then as usual to get your report with:

    cat /sys/kernel/debug/kmemleak

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Catalin Marinas

    Luis R. Rodriguez
     

27 Aug, 2009

1 commit


27 Jun, 2009

3 commits


25 Jun, 2009

1 commit

  • (feature suggested by Sergey Senozhatsky)

    Kmemleak needs to track all the memory allocations but some of these
    happen before kmemleak is initialised. These are stored in an internal
    buffer which may be exceeded in some kernel configurations. This patch
    adds a configuration option with a default value of 400 and also removes
    the stack dump when the early log buffer is exceeded.

    Signed-off-by: Catalin Marinas
    Acked-by: Sergey Senozhatsky

    Catalin Marinas
     

12 Jun, 2009

1 commit