[PATCH] use hierarchy mutex in creation failure path

Paul Menage menage at google.com
Thu Jan 15 20:34:28 PST 2009


On Thu, Jan 15, 2009 at 7:17 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu at jp.fujitsu.com> wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
>
> Now, cgrp->sibling is handled under hierarchy mutex.
> error route should do so, too.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>

Acked-by Paul Menage <menage at google.com>

Good catch, thanks.

Paul

>
> ---
>  kernel/cgroup.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> Index: mmotm-2.6.29-Jan14/kernel/cgroup.c
> ===================================================================
> --- mmotm-2.6.29-Jan14.orig/kernel/cgroup.c
> +++ mmotm-2.6.29-Jan14/kernel/cgroup.c
> @@ -2434,7 +2434,9 @@ static long cgroup_create(struct cgroup
>
>  err_remove:
>
> +       cgroup_lock_hierarchy(root);
>        list_del(&cgrp->sibling);
> +       cgroup_unlock_hierarchy(root);
>        root->number_of_cgroups--;
>
>  err_destroy:
>
>


More information about the Containers mailing list