lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectSome issues about the kernel memory leak detector: __scan_block() function
Hi Catalin,

I have tested your latest kernel memory leak detector on my ARM device
and for curiosity I have checked some part of your patch to figure out
how the memory is scanned and compared to radix tree for detecting
orphan pointer.

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?

If this is possible, during the "for (ptr = start; ptr < end; ptr++)
{} " loop in the __scan_block(), the ptr variable can assume the
address 0xb7d73000 and the radix_tree_lookup() returns the
corresponding memleak_pointer and thus such pointer to this memory
area is not considered orphan (indeed it is an orphan pointer), right?
BR,

Mauricio Lin.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-17 00:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site