diff options
author | andrew <andrew@FreeBSD.org> | 2012-05-22 07:04:23 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2012-05-22 07:04:23 +0000 |
commit | 39fa59acb9f8e2454040a8772678e723665e8711 (patch) | |
tree | 4eb93dc5257c886fab6bf54fef6126225f8c1145 /sys/vm/vm_page.c | |
parent | 7efe8da4514272ec6d71069345076e588ded159a (diff) | |
download | FreeBSD-src-39fa59acb9f8e2454040a8772678e723665e8711.zip FreeBSD-src-39fa59acb9f8e2454040a8772678e723665e8711.tar.gz |
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
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index d4adf75..65af69d 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -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); } |