[Devel] Re: [PATCH v2 04/29] slub: always get the cache from its page in kfree

Christoph Lameter cl at linux.com
Fri May 11 10:53:31 PDT 2012


On Fri, 11 May 2012, Glauber Costa wrote:

> struct page already have this information. If we start chaining
> caches, this information will always be more trustworthy than
> whatever is passed into the function

Other allocators may not have that information and this patch may
cause bugs to go unnoticed if the caller specifies the wrong slab cache.

Adding a VM_BUG_ON may be useful to make sure that kmem_cache_free is
always passed the correct slab cache.




More information about the Devel mailing list