Re: Exact leak location in KMemleak Output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Thu, Oct 28, 2010 at 00:10, Sankar P <sankar.curiosity@xxxxxxxxx> 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....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux