diff options
author | Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> | 2009-01-15 22:51:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-16 01:39:39 +0100 |
commit | 40d58138f832a48208cdce57d6572a033b1f7a23 (patch) | |
tree | 740c3ccefa96965cb5e27f4b13dc1e03e6f688a3 /Documentation/irqflags-tracing.txt | |
parent | memcg: fix mem_cgroup_get_reclaim_stat_from_page (diff) | |
download | linux-40d58138f832a48208cdce57d6572a033b1f7a23.tar.xz linux-40d58138f832a48208cdce57d6572a033b1f7a23.zip |
memcg: fix error path of mem_cgroup_move_parent
There is a bug in error path of mem_cgroup_move_parent.
Extra refcnt got from try_charge should be dropped, and usages incremented
by try_charge should be decremented in both error paths:
A: failure at get_page_unless_zero
B: failure at isolate_lru_page
This bug makes this parent directory unremovable.
In case of A, rmdir doesn't return, because res.usage doesn't go down to 0
at mem_cgroup_force_empty even after all the pc in lru are removed.
In case of B, rmdir fails and returns -EBUSY, because it has extra ref
counts even after res.usage goes down to 0.
Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/irqflags-tracing.txt')
0 files changed, 0 insertions, 0 deletions