From: David S. Miller Date: Thu, 24 Apr 2008 06:30:59 +0000 (-0700) Subject: [LMB]: Fix lmb allocation regression. X-Git-Tag: v2.6.26-rc1~1089^2~22 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7347aefbccb47ce2d076d8ac7dff2cdd1435974c;p=linux-2.6-omap-h63xx.git [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 --- diff --git a/lib/lmb.c b/lib/lmb.c index 896e2832099..207147ab25e 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; }