lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] use hierarchy mutex in creation failure path
From
On Thu, Jan 15, 2009 at 7:17 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> Now, cgrp->sibling is handled under hierarchy mutex.
> error route should do so, too.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

Acked-by Paul Menage <menage@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:
>
>


\
 
 \ /
  Last update: 2009-01-16 05:37    [W:0.043 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site