[lkml]   [2006]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Some issues about the kernel memory leak detector: __scan_block() function
    On 17/08/06, Mauricio Lin <> wrote:
    > On 8/17/06, Catalin Marinas <> wrote:
    > > On 16/08/06, Mauricio Lin <> wrote:
    > > > Let's suppose the a kmalloc() was executed without storing the
    > > > returned pointer to the memory area and its fictitious returned value
    > > > would be the address 0xb7d73000 as:
    > > >
    > > > kmalloc(32, GFP_KERNEL); // Cause memory leak
    > > >
    > > > Is there any possibility the __scan_block() scans a memory block that
    > > > contains the memory area allocated by the previous kmalloc?
    > >
    > > That's what the memleak-test module does.
    > >
    > > Yes, there is a chance and this is called a false negative. If there
    > > is a (non-)pointer location having this value (especially the stack),
    > > it won't be reported. However, these locations might change and at
    > > some point you will get the leak reported.
    > Do you mean that the (non-)pointer location might be moved to another
    > memory location?

    No, I mean that the value at that location might be changed. Let's say
    you have a location in the data section or in another kmalloc'ed block
    (which is trackable from the data section) which has value 0xb7d73000.
    If this just happened to be random data, there is a chance that it
    will be modified to something else and a new scan won't find it

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-08-17 16:07    [W:0.023 / U:1.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site