[Devel] [PATCH rh7] mm/memcg: restore lost css_put() in memcg_kmem_cache_create_func()

Andrey Ryabinin aryabinin at virtuozzo.com
Thu Oct 10 11:21:13 MSK 2019


Restore lost css_put() in memcg_kmem_cache_create_func() otherwise
mem cgroup cannot be destroyed.

https://jira.sw.ru/browse/PSBM-98444
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d499deb94453..74696414874e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3636,6 +3636,7 @@ static void memcg_kmem_cache_create_func(struct work_struct *w)
 
 	memcg_create_kmem_cache(memcg, cachep);
 
+	css_put(&memcg->css);
 	kfree(cw);
 }
 
-- 
2.21.0



More information about the Devel mailing list