On 08/24/2012 08:12 PM, Christoph Lameter wrote: > What is done there can be done in __kmem_cache_shutdown. > > This affects RCU handling somewhat. On rcu free all slab allocators > do not refer to other management structures than the kmem_cache structure. > Therefore these other structures can be freed before the rcu deferred > free to the page allocator occurs. > > Reviewed-by: Joonsoo Kim <js1304@xxxxxxxxx> > Signed-off-by: Christoph Lameter <cl@xxxxxxxxx> Here is the code for that in slab_common.c: if (!__kmem_cache_shutdown(s)) { if (s->flags & SLAB_DESTROY_BY_RCU) rcu_barrier(); __kmem_cache_destroy(s); } ... All that code that used to belong in __kmem_cache_destroy(), will not be executed in kmem_cache_shutdown() without an rcu_barrier. You need at least Paul's ack here to guarantee it is safe, but I believe it is not. Take a look for instance at 7ed9f7e5db5, which describes a subtle bug arising from such a situation. -- 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>