Re: Common [2/9] slub: Use kmem_cache for the kmem_cache structure

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

 



On Wed, 1 Aug 2012, Glauber Costa wrote:

> On 07/31/2012 09:36 PM, Christoph Lameter wrote:
> > Do not use kmalloc() but kmem_cache_alloc() for the allocation
> > of the kmem_cache structures in slub.
> >
> > This is the way its supposed to be. Recent merges lost
> > the freeing of the kmem_cache structure and so this is also
> > fixing memory leak on kmem_cache_destroy() by adding
> > the missing free action to sysfs_slab_remove().
>
> This patch seems incomplete to say the least.

Well ok we could have also converted those but these statements will be
removed later anyways. And you can release a kmem_cache allocation
legitimately with kfree so this works just fine. The problem was that the
release in slab_common did a kmem_cache_free() which must have an object
from the correct cache.

Will update those and the Next patchset will include the conversion of
those as well.

--
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]