]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 23 Mar 2010 20:35:34 +0000 (13:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:58:46 +0000 (15:58 -0700)
commit893b328f07c17aa84f562fc5566eb524bd76188e
tree6ee34077dea0834d5952d8696c60bd9543747553
parentfa8e8558a6874707d8e30c85bb386f43cb61a6e1
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>
init/main.c
kernel/cpuset.c
kernel/kthread.c