diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-12-06 13:42:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-12-06 13:42:03 -0800 |
commit | ddfc146ed500f9aa071f3d913312bdbb0c9eaae0 (patch) | |
tree | 6a6b6278b25034f2ee696a17b593254ae68cf768 /drivers | |
parent | c7cde621b2acfd6bc7d5f002b19b60ad2ed25df8 (diff) | |
parent | 180bbad698641873120a48857bb3b9f3166bf684 (diff) | |
download | lwn-ddfc146ed500f9aa071f3d913312bdbb0c9eaae0.tar.gz lwn-ddfc146ed500f9aa071f3d913312bdbb0c9eaae0.zip |
Merge tag 'fixes-2024-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock fixes from Mike Rapoport:
"Restore check for node validity in arch_numa.
The rework of NUMA initialization in arch_numa dropped a check that
refused to accept configurations with invalid node IDs.
Restore that check to ensure that when firmware passes invalid nodes,
such configuration is rejected and kernel gracefully falls back to
dummy NUMA"
* tag 'fixes-2024-12-06' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
arch_numa: Restore nid checks before registering a memblock with a node
memblock: allow zero threshold in validate_numa_converage()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/arch_numa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index e18701676426..c99f2ab105e5 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -208,6 +208,10 @@ static int __init numa_register_nodes(void) { int nid; + /* Check the validity of the memblock/node mapping */ + if (!memblock_validate_numa_coverage(0)) + return -EINVAL; + /* Finally register nodes. */ for_each_node_mask(nid, numa_nodes_parsed) { unsigned long start_pfn, end_pfn; |