aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lmb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-24 02:30:59 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-24 02:30:59 -0400
commit7347aefbccb47ce2d076d8ac7dff2cdd1435974c (patch)
tree1099122c0fd687ada9a9d0d20949a6df58a2c971 /lib/lmb.c
parent807501475fce0ebe68baedf87f202c3e4ee0d12c (diff)
[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>
Diffstat (limited to 'lib/lmb.c')
-rw-r--r--lib/lmb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lmb.c b/lib/lmb.c
index 896e2832099e..207147ab25e4 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)
346 if (j < 0) { 346 if (j < 0) {
347 /* this area isn't reserved, take it */ 347 /* this area isn't reserved, take it */
348 if (lmb_add_region(&lmb.reserved, base, 348 if (lmb_add_region(&lmb.reserved, base,
349 size) < 0) 349 lmb_align_up(size, align)) < 0)
350 return 0; 350 return 0;
351 return base; 351 return base;
352 } 352 }