Correct an off-by-one error in vm_reserv_reclaim_contig() that results in
an infinite loop. Submitted by: Svatopluk Kraus MFC after: 1 week
This commit is contained in:
parent
285a2b7b6d
commit
f116ec9943
@ -983,8 +983,18 @@ vm_reserv_reclaim_contig(u_long npages, vm_paddr_t low, vm_paddr_t high,
|
||||
break;
|
||||
} else if ((pa & (alignment - 1)) != 0 ||
|
||||
((pa ^ (pa + size - 1)) & ~(boundary - 1)) != 0) {
|
||||
/* Continue with this reservation. */
|
||||
hi = lo;
|
||||
/*
|
||||
* The current page doesn't meet the alignment
|
||||
* and/or boundary requirements. Continue
|
||||
* searching this reservation until the rest
|
||||
* of its free pages are either excluded or
|
||||
* exhausted.
|
||||
*/
|
||||
hi = lo + 1;
|
||||
if (hi >= NBPOPMAP) {
|
||||
hi = 0;
|
||||
i++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
/* Find the next used page. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user