diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 6cc693b91c4a51c32dd636f4685a35c9a395f94e..09751657abdc17f235675c187d925afdd7da9bc2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4317,6 +4317,8 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
 
 	printk(KERN_INFO "Initializing cgroup subsys %s\n", ss->name);
 
+	mutex_lock(&cgroup_mutex);
+
 	/* init base cftset */
 	cgroup_init_cftsets(ss);
 
@@ -4346,6 +4348,8 @@ static void __init cgroup_init_subsys(struct cgroup_subsys *ss)
 	if (ss->post_create)
 		ss->post_create(dummytop);
 
+	mutex_unlock(&cgroup_mutex);
+
 	/* this function shouldn't be used with modular subsystems, since they
 	 * need to register a subsys_id, among other things */
 	BUG_ON(ss->module);