Skip to contentSkip to conversation

+ memblock-add-limit-checking-to-memblock_virt_alloc.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jan 28, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + memblock-add-limit-checking-to-memblock_virt_alloc.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 28 Jan 2014 14:08:49 -0800

The patch titled
Subject: memblock: Add limit checking to memblock_virt_alloc
has been added to the -mm tree. Its filename is
memblock-add-limit-checking-to-memblock_virt_alloc.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/memblock-add-limit-checking-to-memblock_virt_alloc.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/memblock-add-limit-checking-to-memblock_virt_alloc.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
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-add-limit-checking-to-memblock_virt_alloc.patch linux-next.patch