projects/linux·commit baef99a0

cgroups: use hierarchy mutex in creation failure path

baef99a0 · KAMEZAWA Hiroyuki <[email protected]> · 2009-01-29 14:25:10 -08:00

Now, cgrp->sibling is handled under hierarchy mutex.
error route should do so, too.

Signed-off-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Li Zefan <[email protected]>
Acked-by Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
baef99a08a2e23d9386b47e53fa5f0d44fc98f66
Parents
9e9e3cbc

Changes

1 files changed · +2 −0

FileStatusAddDelContent
kernel/cgroup.cmodified+2−0View file

kernel/cgroup.c

View file
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index c298310..2ae7cb4 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2434,7 +2434,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
err_remove:
+ cgroup_lock_hierarchy(root);
list_del(&cgrp->sibling);
+ cgroup_unlock_hierarchy(root);
root->number_of_cgroups--;
err_destroy: