[PATCH -mm v3 4/7] memcg, slab: unregister cache from memcg before starting to destroy it

2014-02-19 Thread Vladimir Davydov
Currently, memcg_unregister_cache(), which deletes the cache being destroyed from the memcg_slab_caches list, is called after __kmem_cache_shutdown() (see kmem_cache_destroy()), which starts to destroy the cache. As a result, one can access a partially destroyed cache while traversing a

[PATCH -mm v3 4/7] memcg, slab: unregister cache from memcg before starting to destroy it

2014-02-19 Thread Vladimir Davydov
Currently, memcg_unregister_cache(), which deletes the cache being destroyed from the memcg_slab_caches list, is called after __kmem_cache_shutdown() (see kmem_cache_destroy()), which starts to destroy the cache. As a result, one can access a partially destroyed cache while traversing a