[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37143.10.75.179.62.1231412446.squirrel@webmail-b.css.fujitsu.com>
Date: Thu, 8 Jan 2009 20:00:46 +0900 (JST)
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
To: "Daisuke Nishimura" <nishimura@....nes.nec.co.jp>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
kamezawa.hiroyu@...fujitsu.com, balbir@...ux.vnet.ibm.com,
lizf@...fujitsu.com, menage@...gle.com, nishimura@....nes.nec.co.jp
Subject: Re: [RFC][PATCH 2/4] memcg: fix error path of
mem_cgroup_move_parent
Daisuke Nishimura said:
> 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@....nes.nec.co.jp>
Thank you for catching.
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists