]> git.baikalelectronics.ru Git - kernel.git/commit
memcg: avoid dangling reference count in creation failure.
authorGlauber Costa <glommer@parallels.com>
Sat, 23 Feb 2013 00:34:57 +0000 (16:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:18 +0000 (17:50 -0800)
commit787ba88775802d07e45f50de4087d5de29eab97e
tree6ba363f7454d0b8e6b4db8997c8b7fa587f20279
parentb7ee03c7c3869e16bcb6570db6445f45b5e034f6
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c