lkml.org 
[lkml]   [2009]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 5/8] kmemleak: Do not report alloc_bootmem blocks as leaks
    From
    Date
    This patch sets the min_count for alloc_bootmem objects to 0 so that
    they are never reported as leaks. This is because many of these blocks
    are only referred via the physical address which is not looked up by
    kmemleak.

    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Pekka Enberg <penberg@cs.helsinki.fi>
    ---
    mm/bootmem.c | 6 +++++-
    1 files changed, 5 insertions(+), 1 deletions(-)

    diff --git a/mm/bootmem.c b/mm/bootmem.c
    index 701740c..555d5d2 100644
    --- a/mm/bootmem.c
    +++ b/mm/bootmem.c
    @@ -521,7 +521,11 @@ find_block:
    region = phys_to_virt(PFN_PHYS(bdata->node_min_pfn) +
    start_off);
    memset(region, 0, size);
    - kmemleak_alloc(region, size, 1, 0);
    + /*
    + * The min_count is set to 0 so that bootmem allocated blocks
    + * are never reported as leaks.
    + */
    + kmemleak_alloc(region, size, 0, 0);
    return region;
    }



    \
     
     \ /
      Last update: 2009-07-24 18:15    [W:0.051 / U:152.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site