* [PATCH -next] cpuset: initialize cpuset a bit early
@ 2015-03-04 9:09 Zefan Li
[not found] ` <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Zefan Li @ 2015-03-04 9:09 UTC (permalink / raw)
To: Tejun Heo; +Cc: LKML, Cgroups, Ming Lei, Vladimir Davydov
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>
---
init/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/main.c b/init/main.c
index 61b9937..50d1e95 100644
--- a/init/main.c
+++ b/init/main.c
@@ -667,8 +667,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();
--
1.8.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH -next] cpuset: initialize cpuset a bit early [not found] ` <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> @ 2015-03-04 9:19 ` Ming Lei 2015-03-04 10:40 ` Vladimir Davydov 2015-03-05 13:06 ` Tejun Heo 2 siblings, 0 replies; 4+ messages in thread From: Ming Lei @ 2015-03-04 9:19 UTC (permalink / raw) To: Zefan Li; +Cc: Tejun Heo, LKML, Cgroups, Vladimir Davydov On Wed, Mar 4, 2015 at 5:09 PM, Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote: > 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-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> > Fixes: 295458e67284 ("cgroup: call cgroup_subsys->bind on cgroup subsys initialization") > Reported by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Signed-off-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Looks this patch does fix the boot issue. > --- > init/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/init/main.c b/init/main.c > index 61b9937..50d1e95 100644 > --- a/init/main.c > +++ b/init/main.c > @@ -667,8 +667,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(); > > -- > 1.8.0.2 > Thanks Ming Lei ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cpuset: initialize cpuset a bit early [not found] ` <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 2015-03-04 9:19 ` Ming Lei @ 2015-03-04 10:40 ` Vladimir Davydov 2015-03-05 13:06 ` Tejun Heo 2 siblings, 0 replies; 4+ messages in thread From: Vladimir Davydov @ 2015-03-04 10:40 UTC (permalink / raw) To: Zefan Li; +Cc: Tejun Heo, LKML, Cgroups, Ming Lei On Wed, Mar 04, 2015 at 05:09:33PM +0800, Zefan Li wrote: > 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-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> > Fixes: 295458e67284 ("cgroup: call cgroup_subsys->bind on cgroup subsys initialization") > Reported by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Signed-off-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Acked-by: Vladimir Davydov <vdavydov-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> Thanks! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] cpuset: initialize cpuset a bit early [not found] ` <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> 2015-03-04 9:19 ` Ming Lei 2015-03-04 10:40 ` Vladimir Davydov @ 2015-03-05 13:06 ` Tejun Heo 2 siblings, 0 replies; 4+ messages in thread From: Tejun Heo @ 2015-03-05 13:06 UTC (permalink / raw) To: Zefan Li; +Cc: LKML, Cgroups, Ming Lei, Vladimir Davydov On Wed, Mar 04, 2015 at 05:09:33PM +0800, Zefan Li wrote: > 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-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> > Fixes: 295458e67284 ("cgroup: call cgroup_subsys->bind on cgroup subsys initialization") > Reported by: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Signed-off-by: Zefan Li <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> Applied to cgroup/for-4.1. Thanks. -- tejun ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-05 13:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-04 9:09 [PATCH -next] cpuset: initialize cpuset a bit early Zefan Li
[not found] ` <54F6CBCD.50009-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-03-04 9:19 ` Ming Lei
2015-03-04 10:40 ` Vladimir Davydov
2015-03-05 13:06 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox