mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
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> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5574169613
commit
5ab116c934
3 changed files with 14 additions and 10 deletions
|
@ -858,7 +858,7 @@ static int __init kernel_init(void * unused)
|
|||
/*
|
||||
* init can allocate pages on any node
|
||||
*/
|
||||
set_mems_allowed(node_possible_map);
|
||||
set_mems_allowed(node_states[N_HIGH_MEMORY]);
|
||||
/*
|
||||
* init can run on any cpu.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue