summaryrefslogtreecommitdiff
path: root/sys/uvm
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-03-06 14:27:30 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-03-06 14:27:30 +0000
commit00597d099fa83cc6bbcd49cb739ff402ca9dbfb6 (patch)
treea81f290eb9308cb75d32889e89a6a49f8237e48f /sys/uvm
parent7769f874343034c4e2214fead258c9bf4a9f5798 (diff)
do not panic unwiring unmapped memory (mmap3 regress); from netbsd; kettenis@ tedu@ ok
Diffstat (limited to 'sys/uvm')
-rw-r--r--sys/uvm/uvm_fault.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c
index 712dab56773..850c13f7bfb 100644
--- a/sys/uvm/uvm_fault.c
+++ b/sys/uvm/uvm_fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_fault.c,v 1.36 2005/11/29 05:37:14 tedu Exp $ */
+/* $OpenBSD: uvm_fault.c,v 1.37 2006/03/06 14:27:29 mickey Exp $ */
/* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */
/*
@@ -1864,16 +1864,13 @@ uvm_fault_unwire_locked(map, start, end)
for (va = start; va < end ; va += PAGE_SIZE) {
if (pmap_extract(pmap, va, &pa) == FALSE)
- panic("uvm_fault_unwire_locked: unwiring "
- "non-wired memory");
+ continue;
/*
- * make sure the current entry is for the address we're
- * dealing with. if not, grab the next entry.
+ * find the map entry for the current address.
*/
-
KASSERT(va >= entry->start);
- if (va >= entry->end) {
+ while (va >= entry->end) {
KASSERT(entry->next != &map->header &&
entry->next->start <= entry->end);
entry = entry->next;