Commit 53186095 authored by David Rientjes's avatar David Rientjes Committed by Greg Kroah-Hartman

mm, oom: ensure sysrq+f always passes valid zonelist

With hotpluggable and memoryless nodes, it's possible that node 0 will
not be online, so use the first online node's zonelist rather than
hardcoding node 0 to pass a zonelist with all zones to the oom killer.
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18e0749a
...@@ -346,7 +346,8 @@ static struct sysrq_key_op sysrq_term_op = { ...@@ -346,7 +346,8 @@ static struct sysrq_key_op sysrq_term_op = {
static void moom_callback(struct work_struct *ignored) static void moom_callback(struct work_struct *ignored)
{ {
out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true); out_of_memory(node_zonelist(first_online_node, GFP_KERNEL), GFP_KERNEL,
0, NULL, true);
} }
static DECLARE_WORK(moom_work, moom_callback); static DECLARE_WORK(moom_work, moom_callback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment