diff options
author | 2004-05-03 07:14:53 +0000 | |
---|---|---|
committer | 2004-05-03 07:14:53 +0000 | |
commit | 474c9dd9da388b43a120f90c00751b850c999737 (patch) | |
tree | 5fdd66aab92694007a03c1dd7fab848f8fcbec03 | |
parent | build the error message in strerror_r.c directly, avoiding one copy there. (diff) | |
download | wireguard-openbsd-474c9dd9da388b43a120f90c00751b850c999737.tar.xz wireguard-openbsd-474c9dd9da388b43a120f90c00751b850c999737.zip |
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.c | 5 |
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)); } |