mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Some issues about the kernel memory leak detector: __scan_block() function
@ 2006-08-16 22:19 Mauricio Lin
  2006-08-17  8:28 ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Mauricio Lin @ 2006-08-16 22:19 UTC (permalink / raw)
  To: catalin.marinas; +Cc: linux-kernel

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-17 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 22:19 Some issues about the kernel memory leak detector: __scan_block() function Mauricio Lin
2006-08-17  8:28 ` Catalin Marinas
2006-08-17 13:59   ` Mauricio Lin
2006-08-17 14:03     ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®