]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Revert "memcg: avoid dangling reference count in creation failure"
authorMichal Hocko <mhocko@suse.cz>
Mon, 8 Jul 2013 23:00:27 +0000 (16:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:24 +0000 (10:33 -0700)
commitfa460c2d37870e0a6f94c70e8b76d05ca11b6db0
tree4bcee4af7ad147b1331e03910d66cc34c4e0e8dd
parent493af578040e690f93f0fc8d9e7667ffff8155bb
Revert "memcg: avoid dangling reference count in creation failure"

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 <mhocko@suse.cz>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Glauber Costa <glommer@openvz.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: <stable@vger.kernel.org> [3.9+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c