Skip to contentSkip to conversation

memblock-add-limit-checking-to-memblock_virt_alloc.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 30, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [merged] memblock-add-limit-checking-to-memblock_virt_alloc.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 30 Jan 2014 12:05:22 -0800

The patch titled
Subject: memblock: add limit checking to memblock_virt_alloc
has been removed from the -mm tree. Its filename was
memblock-add-limit-checking-to-memblock_virt_alloc.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yinghai Lu <[email protected]>
Subject: memblock: add limit checking to memblock_virt_alloc

In original bootmem wrapper for memblock, we have limit checking.

Add it to memblock_virt_alloc, to address arm and x86 booting crash.

---

 mm/memblock.c |    3 +++
 1 file changed, 3 insertions(+)
mm/memblock.c renamed from mm/memblock.c~memblock-add-limit-checking-to-memblock_virt_alloc +3 -0
diff -puN mm/memblock.c~memblock-add-limit-checking-to-memblock_virt_alloc mm/memblock.c
@@ -1077,6 +1077,9 @@ static void * __init memblock_virt_alloc
 	if (!align)
 		align = SMP_CACHE_BYTES;
 
+	if (max_addr > memblock.current_limit)
+		max_addr = memblock.current_limit;
+
 again:
 	alloc = memblock_find_in_range_node(size, align, min_addr, max_addr,
 					    nid);

_

Patches currently in -mm which might be from [email protected] are

origin.patch
memblock-bootmem-restore-goal-for-alloc_low.patch
linux-next.patch