summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2024-12-03 07:54:21 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2024-12-03 07:54:21 +0000
commit52c029ff228354e66c987a234493a4ea355d7056 (patch)
treeea9cab00cdbf0cf1c783d9b7f02badd5d2bef162
parent4fe08488d7b19f89b664983de18077105561c19a (diff)
Add missing wakeup & cleanup in error path.
ok tb@
-rw-r--r--sys/uvm/uvm_fault.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index ec102f4ed00..5d7e40c8500 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.149 2024/12/03 07:51:21 mpi Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.150 2024/12/03 07:54:20 mpi Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -1418,6 +1418,12 @@ uvm_fault_lower(struct uvm_faultinfo *ufi, struct uvm_faultctx *flt,
if (amap_add(&ufi->entry->aref,
ufi->orig_rvaddr - ufi->entry->start, anon, 0)) {
+ if (pg->pg_flags & PG_WANTED)
+ wakeup(pg);
+
+ atomic_clearbits_int(&pg->pg_flags,
+ PG_BUSY|PG_FAKE|PG_WANTED);
+ UVM_PAGE_OWN(pg, NULL);
uvmfault_unlockall(ufi, amap, uobj);
uvm_anfree(anon);
counters_inc(uvmexp_counters, flt_noamap);