Merge branch 'v2.6.35'
[sfrench/cifs-2.6.git] / mm / page_alloc.c
index 68319dd20bed107595661dc6f67fe880d7a5f88d..9bd339eb04c6c84691232bc7e499947fe9d13942 100644 (file)
@@ -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;