projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
493af57
)
Revert "memcg: avoid dangling reference count in creation failure"
author
Michal Hocko
<
[email protected]
>
Mon, 8 Jul 2013 23:00:27 +0000
(16:00 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 9 Jul 2013 17:33:24 +0000
(10:33 -0700)
This reverts commit
e4715f01be697a
.
mem_cgroup_put is hierarchy aware so mem_cgroup_put(memcg) already drops
an additional reference from all parents so the additional
mem_cgrroup_put(parent) potentially causes use-after-free.
Signed-off-by: Michal Hocko <
[email protected]
>
Signed-off-by: Li Zefan <
[email protected]
>
Acked-by: KAMEZAWA Hiroyuki <
[email protected]
>
Cc: Hugh Dickins <
[email protected]
>
Cc: Tejun Heo <
[email protected]
>
Cc: Glauber Costa <
[email protected]
>
Cc: Johannes Weiner <
[email protected]
>
Cc: <
[email protected]
> [3.9+]
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/memcontrol.c
patch
|
blob
|
history
diff --git
a/mm/memcontrol.c
b/mm/memcontrol.c
index 64f726599ff06c6319b82c05dc5a93ef17f5fe09..6b73d8657d64ae45bfd0085e6d4111fa417f3337 100644
(file)
--- a/
mm/memcontrol.c
+++ b/
mm/memcontrol.c
@@
-6352,8
+6352,6
@@
mem_cgroup_css_online(struct cgroup *cont)
* call __mem_cgroup_free, so return directly
*/
mem_cgroup_put(memcg);
- if (parent->use_hierarchy)
- mem_cgroup_put(parent);
}
return error;
}