Commit 5318609519800617323b5fdb17c1d4fe12c3d794
Committed by
Greg Kroah-Hartman
1 parent
18e0749aa8
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/tty/sysrq.c
... | ... | @@ -346,7 +346,8 @@ |
346 | 346 | |
347 | 347 | static void moom_callback(struct work_struct *ignored) |
348 | 348 | { |
349 | - out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true); | |
349 | + out_of_memory(node_zonelist(first_online_node, GFP_KERNEL), GFP_KERNEL, | |
350 | + 0, NULL, true); | |
350 | 351 | } |
351 | 352 | |
352 | 353 | static DECLARE_WORK(moom_work, moom_callback); |