Skip to content

Commit

Permalink
[LMB]: Fix lmb allocation regression.
Browse files Browse the repository at this point in the history
Changeset d9024df ("[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
eea89e1 ("[LMB]: Fix bug in
__lmb_alloc_base().").

This puts it back.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 24, 2008
1 parent 8075014 commit 7347aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7347aef

Please sign in to comment.