Skip to content

[pull] master from torvalds:master #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
06eaa82
mm/memblock: pass size instead of end to memblock_set_node()
RichardWeiYang Mar 18, 2025
eac8ea8
mm/memblock: repeat setting reserved region nid if array is doubled
RichardWeiYang Mar 18, 2025
3b394df
memblock tests: add test for memblock_set_node
RichardWeiYang Mar 18, 2025
649b50a
mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
rpiasetskyi Mar 26, 2025
9078f01
mmc: renesas_sdhi: add regulator dependency
arndb Mar 29, 2025
77183db
mmc: renesas_sdhi: disable clocks if registering regulator failed
Mar 30, 2025
9f5595d
platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep …
superm1 Apr 14, 2025
8d6955e
platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU h…
lan0017 Apr 17, 2025
4a8e04e
platform/x86: alienware-wmi-wmax: Fix uninitialized variable due to b…
kuu-rt Apr 16, 2025
12df9ec
platform/x86/intel: hid: Add Pantherlake support
saranyagopal1 Apr 21, 2025
246f9bb
platform/x86: alienware-wmi-wmax: Add support for Alienware m15 R7
kuu-rt Apr 19, 2025
77bdac7
platform/x86: asus-wmi: Disable OOBE state after resume from hibernation
Apr 18, 2025
02c6e43
platform/x86: ideapad-laptop: add support for some new buttons
gapemir Apr 18, 2025
c73c670
fanotify: fix flush of mntns marks
amir73il Apr 18, 2025
cd188e9
selftests/fs/mount-notify: test also remove/flush of mntns marks
amir73il Apr 18, 2025
4b5256f
Merge tag 'fixes-2025-04-29' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Apr 29, 2025
02d4004
Merge tag 'platform-drivers-x86-v6.15-4' of git://git.kernel.org/pub/…
torvalds Apr 29, 2025
fba784c
Merge tag 'fsnotify_for_v6.15-rc5' of git://git.kernel.org/pub/scm/li…
torvalds Apr 29, 2025
8bac889
Merge tag 'mmc-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kerne…
torvalds Apr 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mm/memblock: repeat setting reserved region nid if array is doubled
Commit 61167ad ("mm: pass nid to reserve_bootmem_region()") introduce
a way to set nid to all reserved region.

But there is a corner case it will leave some region with invalid nid.
When memblock_set_node() doubles the array of memblock.reserved, it may
lead to a new reserved region before current position. The new region
will be left with an invalid node id.

Repeat the process when detecting it.

Fixes: 61167ad ("mm: pass nid to reserve_bootmem_region()")
Signed-off-by: Wei Yang <[email protected]>
CC: Mike Rapoport <[email protected]>
CC: Yajun Deng <[email protected]>
CC: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
  • Loading branch information
RichardWeiYang authored and rppt committed Apr 7, 2025
commit eac8ea8736ccc09513152d970eb2a42ed78e87e8
10 changes: 10 additions & 0 deletions mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,11 +2183,14 @@ static void __init memmap_init_reserved_pages(void)
struct memblock_region *region;
phys_addr_t start, end;
int nid;
unsigned long max_reserved;

/*
* set nid on all reserved pages and also treat struct
* pages for the NOMAP regions as PageReserved
*/
repeat:
max_reserved = memblock.reserved.max;
for_each_mem_region(region) {
nid = memblock_get_region_node(region);
start = region->base;
Expand All @@ -2198,6 +2201,13 @@ static void __init memmap_init_reserved_pages(void)

memblock_set_node(start, region->size, &memblock.reserved, nid);
}
/*
* 'max' is changed means memblock.reserved has been doubled its
* array, which may result a new reserved region before current
* 'start'. Now we should repeat the procedure to set its node id.
*/
if (max_reserved != memblock.reserved.max)
goto repeat;

/*
* initialize struct pages for reserved regions that don't have
Expand Down