mirror of
https://github.com/opnsense/src.git
synced 2026-06-06 15:22:34 -04:00
vm_fault: update pred lock acq in copy_entry
In vm_fault_copy_entry, variable 'mpred' is invalided as the
predecessor of the next page to be inserted when an allocation failure
leads to lock release and reacquisition. Recompute it in that case.
Reported by: markj
Reviewed by: markj
Fixes: vm_page: expose page_alloc_after 6b33d9dc46
Differential Revision: https://reviews.freebsd.org/D49521
This commit is contained in:
parent
03dfb8d021
commit
6d6c97fb72
1 changed files with 4 additions and 2 deletions
|
|
@ -2199,14 +2199,16 @@ again:
|
|||
/*
|
||||
* Allocate a page in the destination object.
|
||||
*/
|
||||
dst_m = vm_page_alloc_after(dst_object, (src_object ==
|
||||
dst_object ? src_pindex : 0) + dst_pindex,
|
||||
pindex = (src_object == dst_object ? src_pindex : 0) +
|
||||
dst_pindex;
|
||||
dst_m = vm_page_alloc_after(dst_object, pindex,
|
||||
VM_ALLOC_NORMAL, mpred);
|
||||
if (dst_m == NULL) {
|
||||
VM_OBJECT_WUNLOCK(dst_object);
|
||||
VM_OBJECT_RUNLOCK(object);
|
||||
vm_wait(dst_object);
|
||||
VM_OBJECT_WLOCK(dst_object);
|
||||
mpred = vm_page_mpred(src_object, pindex);
|
||||
goto again;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue