Re: [PATCH] slub/slab: fix kmemleak didn't work on some case

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

 



On Mon, 8 Jun 2015, Liu, XinwuX wrote:

> when kernel uses kmalloc to allocate memory, slub/slab will find
> a suitable kmem_cache. Ususally the cache's object size is often
> greater than requested size. There is unused space which contains
> dirty data. These dirty data might have pointers pointing to a block

dirty? In what sense?

> of leaked memory. Kernel wouldn't consider this memory as leaked when
> scanning kmemleak object.

This has never been considered leaked memory before to my knowledge and
the data is already initialized.

F.e. The zeroing function in linux/mm/slub.c::slab_alloc_node() zeros the
complete object and not only the number of bytes specified in the kmalloc
call. Same thing is true for SLAB.

I am a bit confused as to what issue this patch would address.

Also please send clean patches without special characters. Ensure proper
tabbing etc.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]