Correct an off-by-one in the boundary check. Otherwise, resource
allocations would fail if the desired allocation size was equal to the boundary.
This commit is contained in:
parent
93001c7214
commit
72aeb19aba
@ -229,7 +229,7 @@ rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end,
|
||||
*/
|
||||
do {
|
||||
rstart = (rstart + amask) & ~amask;
|
||||
if (((rstart ^ (rstart + count)) & bmask) != 0)
|
||||
if (((rstart ^ (rstart + count - 1)) & bmask) != 0)
|
||||
rstart += bound - (rstart & ~bmask);
|
||||
} while ((rstart & amask) != 0 && rstart < end &&
|
||||
rstart < s->r_end);
|
||||
|
Loading…
x
Reference in New Issue
Block a user