mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
cgroups: use hierarchy mutex in creation failure path
Now, cgrp->sibling is handled under hierarchy mutex. error route should do so, too. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Acked-by Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
9e9e3cbc62
commit
baef99a08a
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue