[Devel] [PATCH] use hierarchy mutex in creation failure path

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Thu Jan 15 19:17:25 PST 2009


From: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>

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

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>

---
 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:

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list