mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
vm_phys: Fix vm_phys_find_range() after commit 69cbb18746
vm_phys_seg_paddr_to_vm_page() expects a PA that's in bounds, but
vm_phys_find_range() purposefully returns a pointer to the end of the
last page in a segment.
Fixes: 69cbb18746
("vm_phys: Add a vm_phys_seg_paddr_to_vm_page() helper")
This commit is contained in:
parent
aede0d3bad
commit
fbff6d54da
|
@ -1450,7 +1450,7 @@ vm_phys_find_range(vm_page_t bounds[], int segind, int domain,
|
|||
vm_phys_lazy_init_domain(domain, false);
|
||||
#endif
|
||||
bounds[0] = vm_phys_seg_paddr_to_vm_page(seg, pa_start);
|
||||
bounds[1] = vm_phys_seg_paddr_to_vm_page(seg, pa_end);
|
||||
bounds[1] = &seg->first_page[atop(pa_end - seg->start)];
|
||||
return (seg - vm_phys_segs);
|
||||
}
|
||||
return (-1);
|
||||
|
|
Loading…
Reference in a new issue