Index: sys/uvm/uvm_fault.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/uvm/uvm_fault.c,v diff -u -p -u -p -r1.164 uvm_fault.c --- sys/uvm/uvm_fault.c 25 Feb 2025 11:29:17 -0000 1.164 +++ sys/uvm/uvm_fault.c 9 Mar 2025 02:41:22 -0000 @@ -1739,16 +1739,12 @@ uvm_fault_unwire_locked(vm_map_t map, va * find the map entry for the current address. */ KASSERT(va >= entry->start); - while (entry && va >= entry->end) { + while (va >= entry->end) { next = RBT_NEXT(uvm_map_addr, entry); + KASSERT(next != NULL && next->start <= entry->end); entry = next; } - if (entry == NULL) - return; - if (va < entry->start) - continue; - /* * lock it. */ @@ -1778,7 +1774,7 @@ uvm_fault_unwire_locked(vm_map_t map, va } if (oentry != NULL) { - uvm_map_unlock_entry(oentry); + uvm_map_unlock_entry(entry); } } Index: sys/uvm/uvm_glue.c =================================================================== RCS file: /mount/openbsd/cvs/src/sys/uvm/uvm_glue.c,v diff -u -p -u -p -r1.87 uvm_glue.c --- sys/uvm/uvm_glue.c 28 Oct 2024 08:25:32 -0000 1.87 +++ sys/uvm/uvm_glue.c 9 Mar 2025 02:41:22 -0000 @@ -114,7 +114,7 @@ uvm_vslock(struct proc *p, caddr_t addr, if (end <= start) return (EINVAL); - return uvm_fault_wire(map, start, end, access_type); + return uvm_map_pageable(map, start, end, FALSE, 0); } /* @@ -125,13 +125,14 @@ uvm_vslock(struct proc *p, caddr_t addr, void uvm_vsunlock(struct proc *p, caddr_t addr, size_t len) { + struct vm_map *map = &p->p_vmspace->vm_map; vaddr_t start, end; start = trunc_page((vaddr_t)addr); end = round_page((vaddr_t)addr + len); KASSERT(end > start); - uvm_fault_unwire(&p->p_vmspace->vm_map, start, end); + uvm_map_pageable(map, start, end, TRUE, 0); } /*