summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_page.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-06 10:58:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-02-06 10:58:36 +0000
commitf520d2c34a388af8365a4f5a0f523cecfb025906 (patch)
tree0779fad9ce66aaed997effbba1eede3c9441a14d /sys/uvm/uvm_page.c
parentaf0766fa94a4bb4930f53b2b705f7a089efb4cd6 (diff)
Clear PQ_AOBJ before calling uvm_pagefree(), clearing up one false XXX
comment (one is fixed, one is deleted). ok kettenis beck
Diffstat (limited to 'sys/uvm/uvm_page.c')
-rw-r--r--sys/uvm/uvm_page.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/uvm/uvm_page.c b/sys/uvm/uvm_page.c
index 3c93ee8907b..6b53632de6f 100644
--- a/sys/uvm/uvm_page.c
+++ b/sys/uvm/uvm_page.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_page.c,v 1.132 2014/11/16 12:31:00 deraadt Exp $ */
+/* $OpenBSD: uvm_page.c,v 1.133 2015/02/06 10:58:35 deraadt Exp $ */
/* $NetBSD: uvm_page.c,v 1.44 2000/11/27 08:40:04 chs Exp $ */
/*
@@ -1053,7 +1053,7 @@ uvm_pagefree(struct vm_page *pg)
}
/* Clean page state bits. */
- flags_to_clear |= PQ_AOBJ; /* XXX: find culprit */
+ KASSERT(!(pg->pg_flags & PQ_AOBJ));
flags_to_clear |= PQ_ENCRYPT|PG_ZERO|PG_FAKE|PG_BUSY|PG_RELEASED|
PG_CLEAN|PG_CLEANCHK;
atomic_clearbits_int(&pg->pg_flags, flags_to_clear);
@@ -1098,10 +1098,12 @@ uvm_page_unbusy(struct vm_page **pgs, int npgs)
if (uobj != NULL) {
uvm_lock_pageq();
pmap_page_protect(pg, PROT_NONE);
- /* XXX won't happen right now */
- if (pg->pg_flags & PQ_AOBJ)
+ if (pg->pg_flags & PQ_AOBJ) {
uao_dropswap(uobj,
pg->offset >> PAGE_SHIFT);
+ atomic_clearbits_int(&pg->pg_flags,
+ PQ_AOBJ);
+ }
uvm_pagefree(pg);
uvm_unlock_pageq();
} else {