Merge tag 'fixes-2025-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fixes from Mike Rapoport:

- Mark set_high_memory() as __init to fix section mismatch

- Accept memory allocated in memblock_double_array() to mitigate crash
of SNP guests

* tag 'fixes-2025-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
memblock: Accept allocated memory before use in memblock_double_array()
mm,mm_init: Mark set_high_memory as __init

+9 -2
+8 -1
mm/memblock.c
··· 457 457 min(new_area_start, memblock.current_limit), 458 458 new_alloc_size, PAGE_SIZE); 459 459 460 - new_array = addr ? __va(addr) : NULL; 460 + if (addr) { 461 + /* The memory may not have been accepted, yet. */ 462 + accept_memory(addr, new_alloc_size); 463 + 464 + new_array = __va(addr); 465 + } else { 466 + new_array = NULL; 467 + } 461 468 } 462 469 if (!addr) { 463 470 pr_err("memblock: Failed to double %s array from %ld to %ld entries !\n",
+1 -1
mm/mm_init.c
··· 1786 1786 return IS_ENABLED(CONFIG_ARC) && !IS_ENABLED(CONFIG_ARC_HAS_PAE40); 1787 1787 } 1788 1788 1789 - static void set_high_memory(void) 1789 + static void __init set_high_memory(void) 1790 1790 { 1791 1791 phys_addr_t highmem = memblock_end_of_DRAM(); 1792 1792