Fix an off-by-one error in vm_map_pmap_enter().
If the starting pindex is equal to object->size, there is nothing to do. This was harmless since the rest of vm_map_pmap_enter() has no effect when psize == 0. Submitted by: Wuyang Chung <wuyang.chung1@gmail.com> Reviewed by: alc, dougm, kib MFC after: 1 week Github PR: https://github.com/freebsd/freebsd/pull/417 Differential Revision: https://reviews.freebsd.org/D22678
This commit is contained in:
parent
b75c4efcd2
commit
ed2f945a39
@ -2467,7 +2467,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_prot_t prot,
|
||||
|
||||
psize = atop(size);
|
||||
if (psize + pindex > object->size) {
|
||||
if (object->size < pindex) {
|
||||
if (pindex >= object->size) {
|
||||
VM_OBJECT_RUNLOCK(object);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user