From: David Miller <davem@davemloft.net>
To: akpm@linux-foundation.org
Cc: sparclinux@vger.kernel.org, bugme-daemon@bugzilla.kernel.org,
lomp0101@gmx.net, linux-kernel@vger.kernel.org,
hannes@saeurebad.de
Subject: Re: [Bug 11046] New: Kernel bug in mm/bootmem.c on Sparc machines
Date: Wed, 23 Jul 2008 20:42:47 -0700 (PDT) [thread overview]
Message-ID: <20080723.204247.114065226.davem@davemloft.net> (raw)
In-Reply-To: <20080723203836.e0c14568.akpm@linux-foundation.org>
From: Andrew Morton <akpm@linux-foundation.org>
Date: Wed, 23 Jul 2008 20:38:36 -0700
> So if we're going to change it in 2.6.26, we'll need a separate patch.
Here is the 2.6.26 version:
bootmem: Allow zero length reserve and free.
It's either this or all the call sites explicitly check
when such a case is possible and sometimes expected.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 8d9f60e..e540f7a 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -153,7 +153,8 @@ static void __init reserve_bootmem_core(bootmem_data_t *bdata,
unsigned long sidx, eidx;
unsigned long i;
- BUG_ON(!size);
+ if (!size)
+ return;
/* out of range */
if (addr + size < bdata->node_boot_start ||
@@ -187,7 +188,8 @@ static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
unsigned long sidx, eidx;
unsigned long i;
- BUG_ON(!size);
+ if (!size)
+ return;
/* out range */
if (addr + size < bdata->node_boot_start ||
next prev parent reply other threads:[~2008-07-24 3:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-11046-27@http.bugzilla.kernel.org/>
[not found] ` <20080706132049.4019e09f.akpm@linux-foundation.org>
2008-07-24 3:25 ` David Miller
2008-07-24 3:38 ` Andrew Morton
2008-07-24 3:42 ` David Miller [this message]
2008-07-24 21:32 ` Johannes Weiner
2008-07-24 21:59 ` David Miller
2008-07-24 12:09 ` Johannes Weiner
2008-07-24 18:37 ` Andrew Morton
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=20080723.204247.114065226.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=hannes@saeurebad.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lomp0101@gmx.net \
--cc=sparclinux@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
all inboxes | Powered by JetHome®