[PATCH 16/22] tty/sysrq: use common memory for the manual OOM zonelist
From: Gregory Price (Meta)
Date: Sat Nov 14 2026 - 02:12:18 EST
SysRq-f constructs an OOM request with GFP_KERNEL and supplies a
zonelist for allocation-constraint checks. The request represents an
ordinary allocation, whose fallback domain contains common memory rather
than every node that happens to have memory.
Select the zonelist from the first common-memory node instead of the
first memory node. All memory nodes are common at this point, so
behavior is unchanged.
Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
---
drivers/tty/sysrq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index f4571d05b4962..824f5836b47d7 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -386,7 +386,8 @@ static void moom_callback(struct work_struct *ignored)
{
const gfp_t gfp_mask = GFP_KERNEL;
struct oom_control oc = {
- .zonelist = node_zonelist(first_memory_node, gfp_mask),
+ .zonelist = node_zonelist(first_node_state(N_MEMORY_COMMON),
+ gfp_mask),
.nodemask = NULL,
.memcg = NULL,
.gfp_mask = gfp_mask,
--
2.53.1-Meta