Commit d33a9219 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] alpha: move_initrd fix (from Jeff Wiedemeier)

While testing our upcoming kernel update for 7.2 alpha, I've encountered
a problem with move_initrd. It allocates a page-aligned chunk to move
the initrd into, but it doesn't allocate the entire last
page. Subsequent bootmem allocations can then be filled from the last
page used be the initrd.  This then becomes a problem when the initrd
memory is released.
parent 9a357b21
......@@ -268,7 +268,7 @@ move_initrd(unsigned long mem_limit)
unsigned long size;
size = initrd_end - initrd_start;
start = __alloc_bootmem(size, PAGE_SIZE, 0);
start = __alloc_bootmem(PAGE_ALIGN(size), PAGE_SIZE, 0);
if (!start || __pa(start) + size > mem_limit) {
initrd_start = initrd_end = 0;
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment