Re: Common [02/19] slub: Use kmem_cache for the kmem_cache structure

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

 



On Fri, 3 Aug 2012, Glauber Costa wrote:

> On 08/03/2012 05:52 PM, Christoph Lameter wrote:
> >> When a non-alias cache is freed, both sysfs_slab_remove and
> >> > kmem_cache_release are called.
> >> >
> >> > You are freeing structures on both, so you have two double frees.
> >> >
> >> > slab_sysfs_remove() is the correct place for it, so you need to remove
> >> > them from kmem_cache_release(), which becomes an empty function.
> > So this is another bug in Linus's tree.
> >
>
> Indeed, but only when !SYSFS.
>
> When we have sysfs on, sysfs_slab_remove actually did no freeing - as
> you figured out yourself, so it was actually "correct".

Right so the correct solution is to leave it in kmem_cache_release() and
remove from sysfs_slab_remove. Basically dropping the last hunk of my
patch.


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