diff options
author | alc <alc@FreeBSD.org> | 2010-10-30 23:49:37 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-10-30 23:49:37 +0000 |
commit | c1d60ad229a01416e0ebb34d5cd4bf9c1ed9479a (patch) | |
tree | 7a49788c540161a7dd70318d0bddf72546b76d8e | |
parent | 21a8f93615618fc67c96c22c959dacf4e044330f (diff) | |
download | FreeBSD-src-c1d60ad229a01416e0ebb34d5cd4bf9c1ed9479a.zip FreeBSD-src-c1d60ad229a01416e0ebb34d5cd4bf9c1ed9479a.tar.gz |
Add another safety belt to pmap_demote_DMAP().
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |