Commit bdfba338 authored by Muchun Song's avatar Muchun Song Committed by Sasha Levin
Browse files

mm/memcontrol.c: add missed css_put()

commit 3a98990a upstream.

We should put the css reference when memory allocation failed.

Fixes: f0a3a24b

 ("mm: memcg/slab: rework non-root kmem_cache lifecycle management")
Signed-off-by: default avatarMuchun Song <>
Acked-by: default avatarRoman Gushchin <>
Acked-by: default avatarMichal Hocko <>
Cc: Johannes Weiner <>
Cc: Vladimir Davydov <>
Cc: Qian Cai <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 2652d59d
......@@ -2790,8 +2790,10 @@ static void memcg_schedule_kmem_cache_create(struct mem_cgroup *memcg,
cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN);
if (!cw)
if (!cw) {
cw->memcg = memcg;
cw->cachep = cachep;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment