linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: michael@ellerman.id.au
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: LMB regression...
Date: Wed, 23 Apr 2008 23:40:26 -0700 (PDT)	[thread overview]
Message-ID: <20080423.234026.193720682.davem@davemloft.net> (raw)
In-Reply-To: <1209018933.22532.0.camel@concordia.ozlabs.ibm.com>

From: Michael Ellerman <michael@ellerman.id.au>
Date: Thu, 24 Apr 2008 16:35:33 +1000

> Sounds like we need a test suite :)

Maybe :-)  Anyways, here is the bug fix I plan to push to
Linus with my sparc64 NUMA changes, unless someone has an
objection:

[LMB]: Fix lmb allocation regression.

Changeset d9024df02ffe74d723d97d552f86de3b34beb8cc ("[LMB] Restructure
allocation loops to avoid unsigned underflow") removed the alignment
of the 'size' argument to call lmb_add_region() done by __lmb_alloc_base().

In doing so it reintroduced the bug fixed by changeset
eea89e13a9c61d3928223d2f9bf2295e22e0efb6 ("[LMB]: Fix bug in
__lmb_alloc_base().").

This puts it back.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 lib/lmb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/lmb.c b/lib/lmb.c
index 896e283..207147a 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -346,7 +346,7 @@ u64 __init __lmb_alloc_base(u64 size, u64 align, u64 max_addr)
 			if (j < 0) {
 				/* this area isn't reserved, take it */
 				if (lmb_add_region(&lmb.reserved, base,
-						   size) < 0)
+						   lmb_align_up(size, align)) < 0)
 					return 0;
 				return base;
 			}
-- 
1.5.5.1.57.g5909c

  reply	other threads:[~2008-04-24  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-24  6:24 LMB regression David Miller
2008-04-24  6:35 ` Michael Ellerman
2008-04-24  6:40   ` David Miller [this message]
2008-04-24  6:56 ` Paul Mackerras
2008-04-24  7:01   ` David Miller

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=20080423.234026.193720682.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=michael@ellerman.id.au \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).