mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
Fix off-by-one in the vm_fault_populate() code.
When re-calculating the last inclusive page index after the pager call, -1 was erronously ommitted. If the pager extended the run (unlikely), the result would be insertion of the valid page mapping outside the current map entry range. Found by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
9c81a61ee1
commit
bc27810671
1 changed files with 1 additions and 1 deletions
|
|
@ -409,7 +409,7 @@ vm_fault_populate(struct faultstate *fs, vm_offset_t vaddr, vm_prot_t prot,
|
|||
vm_fault_populate_cleanup(fs->first_object, pager_first,
|
||||
map_first - 1);
|
||||
map_last = MIN(OFF_TO_IDX(fs->entry->end - fs->entry->start +
|
||||
fs->entry->offset), pager_last);
|
||||
fs->entry->offset) - 1, pager_last);
|
||||
if (map_last < pager_last)
|
||||
vm_fault_populate_cleanup(fs->first_object, map_last + 1,
|
||||
pager_last);
|
||||
|
|
|
|||
Loading…
Reference in a new issue