svn commit: r214576 - head/sys/amd64/amd64

Alan Cox alc at FreeBSD.org
Sat Oct 30 23:49:37 UTC 2010


Author: alc
Date: Sat Oct 30 23:49:37 2010
New Revision: 214576
URL: http://svn.freebsd.org/changeset/base/214576

Log:
  Add another safety belt to pmap_demote_DMAP().

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sat Oct 30 23:09:56 2010	(r214575)
+++ head/sys/amd64/amd64/pmap.c	Sat Oct 30 23:49:37 2010	(r214576)
@@ -4973,7 +4973,7 @@ pmap_demote_DMAP(vm_paddr_t base, vm_siz
 	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);


More information about the svn-src-head mailing list