From: KAMEZAWA Hiroyuki Date: Thu, 29 Jan 2009 22:25:10 +0000 (-0800) Subject: cgroups: use hierarchy mutex in creation failure path X-Git-Tag: firefly_0821_release~15729 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=baef99a08a2e23d9386b47e53fa5f0d44fc98f66;p=firefly-linux-kernel-4.4.55.git 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 Cc: Li Zefan Acked-by Paul Menage Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index c29831076e7a..2ae7cb47dbfa 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: