mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 01:52:32 -04:00
memblock tests: add memblock_reserve_many_may_conflict_check()
This may trigger the case fixed by commit 48c3b583bb ("mm/memblock:
fix overlapping allocation when doubling reserved array").
This is done by adding the 129th reserve region into memblock.memory. If
memblock_double_array() use this reserve region as new array, it fails.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240507075833.6346-3-richard.weiyang@gmail.com
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
This commit is contained in:
committed by
Mike Rapoport (IBM)
parent
3d31651937
commit
f6df89c358
@@ -61,7 +61,7 @@ void reset_memblock_attributes(void)
|
||||
|
||||
static inline void fill_memblock(void)
|
||||
{
|
||||
memset(memory_block.base, 1, MEM_SIZE);
|
||||
memset(memory_block.base, 1, PHYS_MEM_SIZE);
|
||||
}
|
||||
|
||||
void setup_memblock(void)
|
||||
@@ -103,7 +103,7 @@ void setup_numa_memblock(const unsigned int node_fracs[])
|
||||
|
||||
void dummy_physical_memory_init(void)
|
||||
{
|
||||
memory_block.base = malloc(MEM_SIZE);
|
||||
memory_block.base = malloc(PHYS_MEM_SIZE);
|
||||
assert(memory_block.base);
|
||||
fill_memblock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user