public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add bootmem failure warning
@ 2003-06-06 17:06 Dave Hansen
  0 siblings, 0 replies; only message in thread
From: Dave Hansen @ 2003-06-06 17:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

__alloc_bootmem_core() has a couple of BUG_ON()'s.  Since the handlers
aren't set up this early, if you hit it, you just get along stream of
"Unknown Interrupt" messages.  It would be very nice to have a little
bit more information when something has decided to BUG() out this
early.  
-- 
Dave Hansen
haveblue@us.ibm.com

[-- Attachment #2: bootmem-core-warn-2.5.70-0.patch --]
[-- Type: text/plain, Size: 544 bytes --]

--- linux-2.5.70-clean/mm/bootmem.c	Mon May 26 18:00:27 2003
+++ linux-2.5.70-early/mm/bootmem.c	Fri Jun  6 06:58:46 2003
@@ -151,7 +151,11 @@ __alloc_bootmem_core(struct bootmem_data
 	unsigned long i, start = 0, incr, eidx;
 	void *ret;
 
-	BUG_ON(!size);
+	if(!size) {
+		printk("__alloc_bootmem_core(): zero-sized request\n");
+		dump_stack();
+		BUG();
+	}
 	BUG_ON(align & (align-1));
 
 	eidx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
diff -rup linux-2.5.70-clean/mm/page_alloc.c linux-2.5.70-early/mm/page_alloc.c

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-06 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 17:06 [PATCH] add bootmem failure warning Dave Hansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox