public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Andrew Morton <akpm@digeo.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] add bootmem failure warning
Date: 06 Jun 2003 10:06:53 -0700	[thread overview]
Message-ID: <1054919213.10204.15.camel@nighthawk> (raw)

[-- 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

                 reply	other threads:[~2003-06-06 16:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1054919213.10204.15.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox