On Sun, Jul 02, 2017 at 09:50:17PM +0300, Vladimir Davydov wrote: > From: Vladimir Davydov <vdavydov.dev@xxxxxxxxx> > Subject: [PATCH] slub: fix per memcg cache leak on css offline > > To avoid a possible deadlock, sysfs_slab_remove() schedules an > asynchronous work to delete sysfs entries corresponding to the kmem > cache. To ensure the cache isn't freed before the work function is > called, it takes a reference to the cache kobject. The reference is > supposed to be released by the work function. However, the work function > (sysfs_slab_remove_workfn()) does nothing in case the cache sysfs entry > has already been deleted, leaking the kobject and the corresponding > cache. This may happen on a per memcg cache destruction, because sysfs > entries of a per memcg cache are deleted on memcg offline if the cache > is empty (see __kmemcg_cache_deactivate()). ... > Reported-by: Andrei Vagin <avagin@xxxxxxxxx> > Signed-off-by: Vladimir Davydov <vdavydov.dev@xxxxxxxxx> > Fixes: 3b7b314053d02 ("slub: make sysfs file removal asynchronous") Oops, Acked-by: Tejun Heo <tj@xxxxxxxxxx> Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html