提交 f74e6670 编写于 作者: L Linus Torvalds

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: NLinus Torvalds <torvalds@osdl.org>
上级 5580ecee
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册