mirror of https://gitee.com/openkylin/linux.git
[LMB]: Fix lmb allocation regression.
Changesetd9024df02f
("[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 changeseteea89e13a9
("[LMB]: Fix bug in __lmb_alloc_base()."). This puts it back. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
807501475f
commit
7347aefbcc
|
@ -346,7 +346,7 @@ u64 __init __lmb_alloc_base(u64 size, u64 align, u64 max_addr)
|
||||||
if (j < 0) {
|
if (j < 0) {
|
||||||
/* this area isn't reserved, take it */
|
/* this area isn't reserved, take it */
|
||||||
if (lmb_add_region(&lmb.reserved, base,
|
if (lmb_add_region(&lmb.reserved, base,
|
||||||
size) < 0)
|
lmb_align_up(size, align)) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue