]> Git Repo - linux.git/commitdiff
bootmem: print request details before BUG_ON(them)
authorJohannes Weiner <[email protected]>
Tue, 6 Jan 2009 22:40:32 +0000 (14:40 -0800)
committerLinus Torvalds <[email protected]>
Tue, 6 Jan 2009 23:59:10 +0000 (15:59 -0800)
Moving the request details print-out before the sanity checks that
might panic() enables us to analyse invalid requests without having
access to the line information of the stack dump.

Signed-off-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/bootmem.c

index ac5a891f142a8176dc7c3fdd2592ef6c89511dec..51a0ccf61e0e97284cf3be1d05d4f43feb293d93 100644 (file)
@@ -435,6 +435,10 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
        unsigned long fallback = 0;
        unsigned long min, max, start, sidx, midx, step;
 
+       bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
+               bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
+               align, goal, limit);
+
        BUG_ON(!size);
        BUG_ON(align & (align - 1));
        BUG_ON(limit && goal + size > limit);
@@ -442,10 +446,6 @@ static void * __init alloc_bootmem_core(struct bootmem_data *bdata,
        if (!bdata->node_bootmem_map)
                return NULL;
 
-       bdebug("nid=%td size=%lx [%lu pages] align=%lx goal=%lx limit=%lx\n",
-               bdata - bootmem_node_data, size, PAGE_ALIGN(size) >> PAGE_SHIFT,
-               align, goal, limit);
-
        min = bdata->node_min_pfn;
        max = bdata->node_low_pfn;
 
This page took 0.055555 seconds and 4 git commands to generate.