]> git.karo-electronics.de Git - karo-tx-linux.git/commit
memcg: avoid dangling reference count in creation failure.
authorGlauber Costa <glommer@parallels.com>
Wed, 20 Feb 2013 02:14:47 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:51 +0000 (16:52 +1100)
commitb8551182cba09339e98c3d72c51b76e1483ee48c
tree43e90e44ec4630c0e20697ccd751d9e5981b42fa
parent2a32a7aea24f9df3126ca9af8bfb9dd687ac78b5
memcg: avoid dangling reference count in creation failure.

When use_hierarchy is enabled, we acquire an extra reference count in our
parent during cgroup creation.  We don't release it, though, if any
failure exist in the creation process.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Reported-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c