Jeremy Fitzhardinge
2007-Apr-18 13:02 UTC
[PATCH] fix boot crash when freeing initrd memory
James Morris wrote:> 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. >Is this booting native or under Xen? I put the BUG_ON in there since if it isn't page-aligned, freeing the page would seem to be freeing something else unexpectedly... I think ChrisW was triggering this BUG_ON at one point, but I don't think we've worked out what's going on here. J
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@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));
Maybe Matching Threads
- [PATCH] fix boot crash when freeing initrd memory
- [PATCH 16/16] xen idle: make xen-specific macro xen-specific
- [PATCH v5 39/75] x86/sev-es: Print SEV-ES info into kernel log
- [PATCH] Fix potential interrupts during alternative patching [was Re: [RFC] Avoid PIT SMP lockups]
- [PATCH] Fix potential interrupts during alternative patching [was Re: [RFC] Avoid PIT SMP lockups]