Skip to content

Commit

Permalink
cpuset: initialize cpuset a bit early
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 295458e ("cgroup: call cgroup_subsys->bind on cgroup subsys initialization")
Reported by: Ming Lei <[email protected]>
Signed-off-by: Zefan Li <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Acked-by: Vladimir Davydov <[email protected]>
  • Loading branch information
lizf-os authored and htejun committed Mar 5, 2015
1 parent 5879451 commit 695df21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 695df21

Please sign in to comment.