Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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()

+6 -2
+4
drivers/base/arch_numa.c
··· 208 208 { 209 209 int nid; 210 210 211 + /* Check the validity of the memblock/node mapping */ 212 + if (!memblock_validate_numa_coverage(0)) 213 + return -EINVAL; 214 + 211 215 /* Finally register nodes. */ 212 216 for_each_node_mask(nid, numa_nodes_parsed) { 213 217 unsigned long start_pfn, end_pfn;
+2 -2
mm/memblock.c
··· 735 735 /** 736 736 * memblock_validate_numa_coverage - check if amount of memory with 737 737 * no node ID assigned is less than a threshold 738 - * @threshold_bytes: maximal number of pages that can have unassigned node 738 + * @threshold_bytes: maximal memory size that can have unassigned node 739 739 * ID (in bytes). 740 740 * 741 741 * A buggy firmware may report memory that does not belong to any node. ··· 755 755 nr_pages += end_pfn - start_pfn; 756 756 } 757 757 758 - if ((nr_pages << PAGE_SHIFT) >= threshold_bytes) { 758 + if ((nr_pages << PAGE_SHIFT) > threshold_bytes) { 759 759 mem_size_mb = memblock_phys_mem_size() >> 20; 760 760 pr_err("NUMA: no nodes coverage for %luMB of %luMB RAM\n", 761 761 (nr_pages << PAGE_SHIFT) >> 20, mem_size_mb);