summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-07-07 18:59:37 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-07-07 18:59:37 +0000
commit279c14a4c9ac668ee2c0c763431496ad6ac9b9a4 (patch)
tree2c53d49c6b9ce6fd9fcf01c6b86fd1bbfe188f48
parentada6f177ee747a36bc6328a6d80da00bb220a7d4 (diff)
Fix pmap_extract() to actually only return TRUE for mappings which have the
valid bit set; can't believe this went unnoticed for so long. This fixes uvm_km_pgremove_intrsafe panics when pool_put()'ing items in pools for larger-than-a-page-items at shutdown time.
-rw-r--r--sys/arch/vax/vax/pmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/vax/vax/pmap.c b/sys/arch/vax/vax/pmap.c
index d6bc1bd89cb..e1e6464a519 100644
--- a/sys/arch/vax/vax/pmap.c
+++ b/sys/arch/vax/vax/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.58 2013/07/03 19:21:55 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.59 2013/07/07 18:59:36 miod Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
@@ -869,7 +869,7 @@ if(startpmapdebug)printf("pmap_extract: pmap %p, va %lx\n",pmap, va);
pte = (int *)pmap->pm_p1br;
}
- if ((*kvtopte(&pte[sva]) & PG_FRAME) != 0) {
+ if ((*kvtopte(&pte[sva]) & PG_V) && (pte[sva] & PG_V)) {
*pap = ((pte[sva] & PG_FRAME) << VAX_PGSHIFT) |
(va & VAX_PGOFSET);
return (TRUE);