Re: [2.6.31] Memory leak in load_module()?

Tetsuo Handa
2009-09-11T12:08:04Z

Catalin Marinas wrote:
> The object above was allocated by kstrdup via setup_modinfo_srcversion
> but the module loading failed and no other kernel part freed the
> mod->filed object. I think it's a real leak but you could try a few
> "echo scan" to make sure it's not just a temporary false positive.
I did

while : ; do insmod /lib/modules/2.6.31/kernel/drivers/edac/r82600_edac.ko; sleep 1; echo scan > /sys/kernel/debug/kmemleak ; sleep 10; dmesg -c; done

and verified that

kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

message appars everytime. This is unlikely temporary false positive.

unreferenced object 0xdeb89408 (size 32):
comm "insmod", pid 2969, jiffies 1406494

unreferenced object 0xde842750 (size 32):
comm "insmod", pid 2989, jiffies 1514442

unreferenced object 0xde842a60 (size 32):
comm "insmod", pid 2993, jiffies 1526889

unreferenced object 0xdeb89440 (size 32):
comm "insmod", pid 2999, jiffies 1539244

I'll wait for maintainer's response.

Thank you.