From c1d60ad229a01416e0ebb34d5cd4bf9c1ed9479a Mon Sep 17 00:00:00 2001 From: alc Date: Sat, 30 Oct 2010 23:49:37 +0000 Subject: Add another safety belt to pmap_demote_DMAP(). --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 2b3c10f..aa20133 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4973,7 +4973,7 @@ pmap_demote_DMAP(vm_paddr_t base, vm_size_t len, boolean_t invalidate) KASSERT(powerof2(len), ("pmap_demote_DMAP: len is not a power of 2")); KASSERT((base & (len - 1)) == 0, ("pmap_demote_DMAP: base is not a multiple of len")); - if (len < NBPDP) { + if (len < NBPDP && base < dmaplimit) { va = PHYS_TO_DMAP(base); changed = FALSE; PMAP_LOCK(kernel_pmap); -- cgit v1.1