Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308861
b: refs/heads/master
c: 2c478ea
h: refs/heads/master
i:
  308859: acacd16
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed May 29, 2012
1 parent 6bd21e3 commit 929146f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 421456edd27cf512b8f0025245a0f3572bd69b00
refs/heads/master: 2c478eae96501163c5c5d5f682bba4d34a7ea1d4
20 changes: 16 additions & 4 deletions trunk/mm/nobootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,17 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,

ptr = __alloc_memory_core_early(MAX_NUMNODES, size, align,
goal, -1ULL);
if (!ptr && goal) {
if (ptr)
return ptr;

if (goal) {
goal = 0;
goto again;
}
return ptr;

printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
panic("Out of memory");
return NULL;
}

void * __init __alloc_bootmem_node_high(pg_data_t *pgdat, unsigned long size,
Expand Down Expand Up @@ -407,6 +413,12 @@ void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
if (ptr)
return ptr;

return __alloc_memory_core_early(MAX_NUMNODES, size, align,
goal, ARCH_LOW_ADDRESS_LIMIT);
ptr = __alloc_memory_core_early(MAX_NUMNODES, size, align,
goal, ARCH_LOW_ADDRESS_LIMIT);
if (ptr)
return ptr;

printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
panic("Out of memory");
return NULL;
}

0 comments on commit 929146f

Please sign in to comment.