Skip to content

Commit

Permalink
x86-64: fix initrd freeing
Browse files Browse the repository at this point in the history
The comparison of the initrd start address against "&_end" is
unnecessary and incorrect.  Make it match the x86 code that just
compares the passed-in arguments.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Jan 16, 2006
1 parent 5580ece commit f74e667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86_64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void mark_rodata_ro(void)
#ifdef CONFIG_BLK_DEV_INITRD
void free_initrd_mem(unsigned long start, unsigned long end)
{
if (start < (unsigned long)&_end)
if (start >= end)
return;
printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
for (; start < end; start += PAGE_SIZE) {
Expand Down

0 comments on commit f74e667

Please sign in to comment.