summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-05-03 07:14:54 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-05-03 07:14:54 +0000
commitb1c0cf477938e39ce2394764c3a5d4308f4021a6 (patch)
treefe750c8bd862482da2d6f6a966df924aee045c60
parentdb0d881c05796f2f89c6a66d7f233bcd6f34fd33 (diff)
protecing with NONE means we must drop the wired count.
solves problems encountered by david@ and dtucker@ (pr3758)
-rw-r--r--sys/uvm/uvm_map.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c
index 505d1eba92c..cb292c7362d 100644
--- a/sys/uvm/uvm_map.c
+++ b/sys/uvm/uvm_map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_map.c,v 1.65 2004/02/23 06:19:32 drahn Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.66 2004/05/03 07:14:53 tedu Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
@@ -2219,6 +2219,9 @@ uvm_map_protect(map, start, end, new_prot, set_max)
if (current->protection != old_prot) {
/* update pmap! */
+ if ((current->protection & MASK(entry)) == PROT_NONE &&
+ VM_MAPENT_ISWIRED(entry))
+ current->wired_count--;
pmap_protect(map->pmap, current->start, current->end,
current->protection & MASK(entry));
}