[PATCH] fix boot crash when freeing initrd memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm triggering this BUG_ON during boot, which happens while freeing initrd 
memory:

 EIP is at free_init_pages+0x37/0xac
 [<c01143f1>] free_initrd_mem+0x11/0x13
 [<c03ce259>] free_initrd+0x13/0x29
 [<c03cf647>] populate_rootfs+0xdc/0xe2
 [<c01003af>] init+0x42/0x253
 [<c0103bbb>] kernel_thread_helper+0x7/0x10


I'm not sure why this memory isn't aligned now.

The patch below allows my system to boot.  Any clues about the correct fix
appreciated.


Signed-off-by: James Morris <jmorris at redhat.com>


---

 arch/i386/mm/init.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -purN -X dontdiff linux-pv-2.6.p/arch/i386/mm/init.c linux-pv-2.6.x/arch/i386/mm/init.c
--- linux-pv-2.6.p/arch/i386/mm/init.c	2006-11-01 16:46:49.000000000 -0500
+++ linux-pv-2.6.x/arch/i386/mm/init.c	2006-11-01 17:18:20.000000000 -0500
@@ -787,7 +787,7 @@ void free_init_pages(char *what, unsigne
 	unsigned long addr;
 
 	BUG_ON(begin != ALIGN(begin, PAGE_SIZE));
-	BUG_ON(end != ALIGN(end, PAGE_SIZE));
+	WARN_ON(end != ALIGN(end, PAGE_SIZE));
 
 	for (addr = begin; addr < end; addr += PAGE_SIZE) {
 		ClearPageReserved(virt_to_page(addr));



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux