Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Vegard Nossum
Date: Friday, August 22, 2008 - 12:54 pm

On Fri, Aug 22, 2008 at 9:24 PM, Vegard Nossum <vegard.nossum@gmail.com> wrote:
[...]

Don't know how much it helps, but I tried this patch:

diff --git a/mm/bootmem.c b/mm/bootmem.c
index 8d9f60e..56298cb 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -244,7 +244,7 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned lo
ng size,

        if (!size) {
                printk("__alloc_bootmem_core(): zero-sized request\n");
-               BUG();
+               return ZERO_SIZE_PTR;
        }
        BUG_ON(align & (align-1));

...and I got this (it was apparently a bad idea ;-)):

__alloc_bootmem_core(): zero-sized request
Dentry cache hash table entries: -2147483648 (order: -13, 0 bytes)
__alloc_bootmem_core(): zero-sized request
Inode-cache hash table entries: -2147483648 (o -13, 0 bytes)
Bad page state in process 'swapper'
page:000000f0 flags:0x00000000 mapping:00000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Pid: 0, comm: swapper Not tainted 2.6.26-00014-g9a2d43b-dirty #36
 [<c01823b0>] bad_page+0x90/0xd0
 [<c018351b>] free_hot_cold_page+0x21b/0x230
 [<c018357a>] free_hot_page+0xa/0x10
 [<c01835ab>] __free_pages+0x2b/0x40
 [<c01849d2>] __free_pages_bootmem+0x82/0xa0
 [<c082baeb>] free_all_bootmem_core+0xfb/0x1d0
 [<c082bbcd>] free_all_bootmem+0xd/0x10
 [<c08268fa>] mem_init+0x7a/0x3a0
 [<c082e612>] ? inode_init_early+0x62/0xb0
 [<c082e408>] ? vfs_caches_init_early+0x18/0xb0
 [<c08159fa>] start_kernel+0x25a/0x390
 [<c0815180>] ? unknown_bootoption+0x0/0x210
 [<c0815008>] __init_begin+0x8/0x10
 =======================
list_add corruption. next->prev should be prev (0000000c), but was
00000000. (next=00000000).
------------[ cut here ]------------
kernel BUG at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/lib/list_debug.c:27!


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
9a2d43b: __alloc_bootmem_core(): zero-sized request, Vegard Nossum, (Fri Aug 22, 12:24 pm)
Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request, Vegard Nossum, (Fri Aug 22, 12:54 pm)
Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request, Johannes Weiner, (Sat Aug 23, 12:12 am)
Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request, Vegard Nossum, (Sun Aug 24, 12:58 am)
Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request, Vegard Nossum, (Sun Aug 24, 1:23 am)
Re: 9a2d43b: __alloc_bootmem_core(): zero-sized request, Vegard Nossum, (Sun Aug 24, 1:43 am)