aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-07-29 15:48:02 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-29 15:48:02 +0100
commit129961ecaf21c9ee899ad9067d917c1aa172fb7a (patch)
tree49eafdcf4d6ac490ecdd92c36c285817872eaf34 /mm/page_alloc.c
parentARM: fix build warning in asm/elf.h (diff)
parentMerge branch 'test' of ../test/linux-2.6-lpc2 into wells/lpc32xx-arch_v2 (diff)
downloadlinux-dev-129961ecaf21c9ee899ad9067d917c1aa172fb7a.tar.xz
linux-dev-129961ecaf21c9ee899ad9067d917c1aa172fb7a.zip
Merge branch 'wells/lpc32xx-arch_v2' of git://git.lpclinux.com/linux-2.6-lpc into devel-stable
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 431214b941ac..9bd339eb04c6 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3634,6 +3634,9 @@ void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
int i;
void *ptr;
+ if (limit > get_max_mapped())
+ limit = get_max_mapped();
+
/* need to go over early_node_map to find out good range for node */
for_each_active_range_index_in_nid(i, nid) {
u64 addr;
@@ -3659,6 +3662,11 @@ void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
ptr = phys_to_virt(addr);
memset(ptr, 0, size);
reserve_early_without_check(addr, addr + size, "BOOTMEM");
+ /*
+ * The min_count is set to 0 so that bootmem allocated blocks
+ * are never reported as leaks.
+ */
+ kmemleak_alloc(ptr, size, 0, 0);
return ptr;
}