cpuset: initialize cpuset a bit early
authorZefan Li <lizefan@huawei.com>
Wed, 4 Mar 2015 09:09:33 +0000 (17:09 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 5 Mar 2015 13:05:20 +0000 (08:05 -0500)
Now we call ss->bind() in cgroup_init(), so cgroup_init() will
call cpuset_bind() and then the latter will access top_cpuset's
cpumask, which is NULL, because cpuset_init() is called after
cgroup_init()

The simplest fix is to swap cgroup_init() and cpuset_init().

Cc: Vladimir Davydov <vdavydov@parallels.com>
Fixes: 295458e67284 ("cgroup: call cgroup_subsys->bind on cgroup subsys initialization")
Reported by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vladimir Davydov <vdavydov@parallels.com>
init/main.c

index 6f0f1c5ff8cc82c41b36f107f68732003c5b1dc3..4a6974e678396d73189f4629537475bc9f3aee42 100644 (file)
@@ -654,8 +654,8 @@ asmlinkage __visible void __init start_kernel(void)
        page_writeback_init();
        proc_root_init();
        nsfs_init();
-       cgroup_init();
        cpuset_init();
+       cgroup_init();
        taskstats_init_early();
        delayacct_init();