[PATCH v2 4/4] mm/page_alloc: remove a VM_BUG_ON()

From: Brendan Jackman

Date: Tue Jul 14 2026 - 05:34:22 EST


VM_BUG_ON() is out of favour and on the way to removal, since I recently
touched this code I am removing this invocation. If this precondition is
violated, the system will soon crash anyway.

Suggested-by: Zi Yan <ziy@xxxxxxxxxx>
Link: https://lore.kernel.org/all/7F866265-3F2E-4765-B9D4-9AB898A9C4AC@xxxxxxxxxx/
Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
---
mm/page_alloc.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d53f858e518f7..0db1a7281fc33 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5438,7 +5438,6 @@ struct page *alloc_pages_node_noprof(int nid, gfp_t gfp_mask, unsigned int order
if (nid == NUMA_NO_NODE)
nid = numa_mem_id();

- VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES);
warn_if_node_offline(nid, gfp_mask);

return __alloc_pages_noprof(gfp_mask, order, nid, NULL, ALLOC_DEFAULT);

--
2.54.0