summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2010-11-18 21:02:40 +0000
committercperciva <cperciva@FreeBSD.org>2010-11-18 21:02:40 +0000
commit38737a3b4655a7e5f2b497236c0e9c6561896b31 (patch)
tree4a390d2a7c6b8e2ecf5feda0ce95f62a8029f08d /sys/i386
parent743ac641977461da2fdffcabb7d4fd76fcd44f66 (diff)
downloadFreeBSD-src-38737a3b4655a7e5f2b497236c0e9c6561896b31.zip
FreeBSD-src-38737a3b4655a7e5f2b497236c0e9c6561896b31.tar.gz
Don't KASSERT in pmap_release that
xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME) for i = NPGPTD, since pmap->pm_pdpt[i] is only initialized for 0 <= i < NPGPTD. This fixes an inevitable panic with XEN && PAE && INVARIANTS when pmap_release is called (e.g., when /sbin/init is launched).
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/xen/pmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c
index 518488c..072c63b 100644
--- a/sys/i386/xen/pmap.c
+++ b/sys/i386/xen/pmap.c
@@ -1877,8 +1877,9 @@ pmap_release(pmap_t pmap)
/* unpinning L1 and L2 treated the same */
xen_pgd_unpin(ma);
#ifdef PAE
- KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME),
- ("pmap_release: got wrong ptd page"));
+ if (i < NPGPTD)
+ KASSERT(xpmap_ptom(VM_PAGE_TO_PHYS(m)) == (pmap->pm_pdpt[i] & PG_FRAME),
+ ("pmap_release: got wrong ptd page"));
#endif
m->wire_count--;
atomic_subtract_int(&cnt.v_wire_count, 1);
OpenPOWER on IntegriCloud