OSDN Git Service

mm: page_alloc: call panic() when memoryless node allocation fails
authorQi Zheng <zhengqi.arch@bytedance.com>
Sun, 12 Feb 2023 11:10:27 +0000 (19:10 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 17 Feb 2023 04:43:54 +0000 (20:43 -0800)
commit1bc67ca65b31bcb669c4eaca79b3c8d205bb212a
treee1b62c4a59b7737ecd64d0b13f56241743f16e4a
parent9f550d78b40da21b4da515db4c37d8d7b12aa1a6
mm: page_alloc: call panic() when memoryless node allocation fails

In free_area_init(), we will continue to run after allocation of
memoryless node pgdat fails.  However, in the subsequent process (such as
when initializing zonelist), the case that NODE_DATA(nid) is NULL is not
handled, which will cause panic.  Instead of this, it's better to call
panic() directly when the memory allocation fails during system boot.

Link: https://lkml.kernel.org/r/20230212111027.95520-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c