svn commit: r235776 - head/sys/vm

Andrew Turner andrew at FreeBSD.org
Tue May 22 07:04:23 UTC 2012


Author: andrew
Date: Tue May 22 07:04:23 2012
New Revision: 235776
URL: http://svn.freebsd.org/changeset/base/235776

Log:
  Fix booting on ARM.
  
  In PHYS_TO_VM_PAGE() when VM_PHYSSEG_DENSE is set the check if we are past
  the end of vm_page_array was incorrect causing it to return NULL. This
  value is then used in vm_phys_add_page causing a data abort.
  
  Reviewed by:	alc, kib, imp
  Tested by:	stas

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Tue May 22 06:33:08 2012	(r235775)
+++ head/sys/vm/vm_page.c	Tue May 22 07:04:23 2012	(r235776)
@@ -647,7 +647,7 @@ PHYS_TO_VM_PAGE(vm_paddr_t pa)
 	long pi;
 
 	pi = atop(pa);
-	if (pi >= first_page && pi < vm_page_array_size) {
+	if (pi >= first_page && (pi - first_page) < vm_page_array_size) {
 		m = &vm_page_array[pi - first_page];
 		return (m);
 	}


More information about the svn-src-head mailing list