memcg: lost css_put in memcg_expand_shrinker_maps()
Subsystems (3)
PATCH 1/1 memcg: lost css_put in memcg_expand_shrinker_maps()
for_each_mem_cgroup() increases css reference counter for memory cgroup and requires to use mem_cgroup_iter_break() if the walk is cancelled.
Cc: [email protected]
Fixes commit 0a4465d34028("mm, memcg: assign memcg-aware shrinkers bitmap to memcg")
--- mm/memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/memcontrol.c +3 -1
@@ -409,8 +409,10 @@ int memcg_expand_shrinker_maps(int new_id)if (mem_cgroup_is_root (memcg))continue ; ret =memcg_expand_one_shrinker_map (memcg, size, old_size); -if (ret) +if (ret) { +mem_cgroup_iter_break (NULL , memcg); goto unlock; + } } unlock:if (!ret)
Signature · 1 line
1.8.3.1
Quoted 7 lines · Vasily Averin
for_each_mem_cgroup()increases css reference counter for memory cgroup and requires to usemem_cgroup_iter_break()if the walk is cancelled.Cc: [email protected]
Fixes commit 0a4465d34028("mm, memcg: assign memcg-aware shrinkers bitmap to memcg")Signed-off-by Vasily Averin <[email protected]>
Thanks!
Quoted 21 lines
--- mm/memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)mm/memcontrol.c +3
-1@@ -409,8 +409,10 @@ int memcg_expand_shrinker_maps(int new_id)if (mem_cgroup_is_root (memcg))continue ; ret =memcg_expand_one_shrinker_map (memcg, size, old_size); -if (ret) +if (ret) { +mem_cgroup_iter_break (NULL , memcg); goto unlock; + } } unlock:if (!ret)
Quoted 5 lines · Vasily Averin
for_each_mem_cgroup()increases css reference counter for memory cgroup and requires to usemem_cgroup_iter_break()if the walk is cancelled.Cc: [email protected]
Fixes commit 0a4465d34028("mm, memcg: assign memcg-aware shrinkers bitmap to memcg")
Is the usual format.
Quoted 1 line
Signed-off-by Vasily Averin <[email protected]>
Thanks!
Quoted 22 lines
--- mm/memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)mm/memcontrol.c +3
-1@@ -409,8 +409,10 @@ int memcg_expand_shrinker_maps(int new_id)if (mem_cgroup_is_root (memcg))continue ; ret =memcg_expand_one_shrinker_map (memcg, size, old_size); -if (ret) +if (ret) { +mem_cgroup_iter_break (NULL , memcg); goto unlock; + } } unlock:if (!ret)Signature · 1 line
1.8.3.1
Signature · 2 lines
Michal Hocko SUSE Labs
Quoted 7 lines · Vasily Averin
for_each_mem_cgroup()increases css reference counter for memory cgroup and requires to usemem_cgroup_iter_break()if the walk is cancelled.Cc: [email protected]
Fixes commit 0a4465d34028("mm, memcg: assign memcg-aware shrinkers bitmap to memcg")Signed-off-by Vasily Averin <[email protected]>
Thank you!
Quoted 23 lines
--- mm/memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)mm/memcontrol.c +3
-1@@ -409,8 +409,10 @@ int memcg_expand_shrinker_maps(int new_id)if (mem_cgroup_is_root (memcg))continue ; ret =memcg_expand_one_shrinker_map (memcg, size, old_size); -if (ret) +if (ret) { +mem_cgroup_iter_break (NULL , memcg); goto unlock; + } } unlock:if (!ret)Signature · 1 line
1.8.3.1