On Wed, Oct 27, 2010 at 11:11 PM, Mulyadi Santosa <[email protected]> wrote: > Hi... > > On Thu, Oct 28, 2010 at 00:10, Sankar P <[email protected]> wrote: >> Hi, >> >> I have an out of tree kernel module with the source: >> >> static __init int hello_init(void) >> { >> char *ptr; >> ptr = vmalloc(512); >> ptr = vmalloc(512); >> ptr = vmalloc(512); >> >> printk(KERN_ALERT "Hello World"); >> >> return 0; >> } >> >> Now I compile this file (hello.c) using my Makefile as follows: >> >> EXTRA_CFLAGS=-g >> obj-m := hello-kernel.o >> hello-kernel-objs := hello.o >> >> >> Now if I insmod my hello-kernel.ko file and then do a `cat >> /sys/kernel/debug/kmemleak` I get an output: >> >> unreferenced object 0xf8211000 (size 512): >> comm "insmod", pid 9602, jiffies 3666022 (age 1553.469s) > > That's because the code path that causes the leak is running on behalf > of "insmod" process....
So, is it impossible get the exact location of leaks that exist in external kernel modules ? and their init/exit functions ? -- Sankar P http://psankar.blogspot.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to [email protected] Please read the FAQ at http://kernelnewbies.org/FAQ
