summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-08-10 04:10:57 +0000
committeralc <alc@FreeBSD.org>1999-08-10 04:10:57 +0000
commit6118d3300ff2f69a7295ae4b9af52ffaf79b3959 (patch)
tree9b941595318d0d0bd2c536c18f6dc84aecc30f68 /sys/i386
parent2cfab0c1d9f553f2f69520f75489675742095ba0 (diff)
downloadFreeBSD-src-6118d3300ff2f69a7295ae4b9af52ffaf79b3959.zip
FreeBSD-src-6118d3300ff2f69a7295ae4b9af52ffaf79b3959.tar.gz
pmap_remove_pages:
Add KASSERT to detect out of range access to the pv_table and report the errant pte before it's overwritten.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index bf78df8..aa51390 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.243 1999/07/31 04:10:31 alc Exp $
+ * $Id: pmap.c,v 1.244 1999/07/31 23:02:57 alc Exp $
*/
/*
@@ -2967,6 +2967,9 @@ pmap_remove_pages(pmap, sva, eva)
ppv = pa_to_pvh(tpte);
+ KASSERT(ppv < &pv_table[pv_npg],
+ ("pmap_remove_pages: bad tpte %x", tpte));
+
pv->pv_pmap->pm_stats.resident_count--;
/*
OpenPOWER on IntegriCloud