diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2010-03-23 16:35:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 19:01:50 -0400 |
commit | 8147bcf0da9a74b7dbec29bb3e489967f91f3c94 (patch) | |
tree | 94ad31b6070692f0169503d4c09ddee062fba545 /init | |
parent | c439578e379c3ffe8ffe4669f2e2af7ecfca74f1 (diff) |
cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
commit 5ab116c9349ef52d6fbd2e2917a53f13194b048e upstream.
cpuset_mem_spread_node() returns an offline node, and causes an oops.
This patch fixes it by initializing task->mems_allowed to
node_states[N_HIGH_MEMORY], and updating task->mems_allowed when doing
memory hotplug.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Reported-by: Nick Piggin <npiggin@suse.de>
Tested-by: Nick Piggin <npiggin@suse.de>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c index 4cb47a159f02..512ba158514d 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -846,7 +846,7 @@ static int __init kernel_init(void * unused) | |||
846 | /* | 846 | /* |
847 | * init can allocate pages on any node | 847 | * init can allocate pages on any node |
848 | */ | 848 | */ |
849 | set_mems_allowed(node_possible_map); | 849 | set_mems_allowed(node_states[N_HIGH_MEMORY]); |
850 | /* | 850 | /* |
851 | * init can run on any cpu. | 851 | * init can run on any cpu. |
852 | */ | 852 | */ |