From: Linus Torvalds Date: Mon, 16 Jan 2006 19:33:09 +0000 (-0800) Subject: x86-64: fix initrd freeing X-Git-Tag: v2.6.16-rc1~87 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f74e6670c4a788c9a0c52ab2036d8ac6be12f1d8;p=linux-2.6 x86-64: fix initrd freeing 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 --- diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index ef84106c15..307d1ac0ef 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -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) {