Re: [PATCH] use hierarchy mutex in creation failure path

From: Paul Menage
Date: Thu Jan 15 2009 - 23:34:57 EST


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

Acked-by Paul Menage <menage@xxxxxxxxxx>

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:
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/