summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-11-14 01:15:19 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 17:13:48 -0800
commit5318609519800617323b5fdb17c1d4fe12c3d794 (patch)
treea02e56d063ea89db60f1d92e41df09cf738a2c60 /drivers/tty
parent18e0749aa825b8af12990521536f617d1405c37f (diff)
downloadlinux-5318609519800617323b5fdb17c1d4fe12c3d794.tar.bz2
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: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/sysrq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 16ee6cee07da..b3c4a250ff86 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -346,7 +346,8 @@ static struct sysrq_key_op sysrq_term_op = {
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);