Add another safety belt to pmap_demote_DMAP().

This commit is contained in:
Alan Cox 2010-10-30 23:49:37 +00:00
parent c04246f45a
commit 2eeee67ce8

View File

@ -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);