svn commit: r265435 - stable/10/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Tue May 6 12:20:08 UTC 2014
Author: kib
Date: Tue May 6 12:20:07 2014
New Revision: 265435
URL: http://svnweb.freebsd.org/changeset/base/265435
Log:
MFC r265100:
Fix the comparision for the end of range in vm_phys_fictitious_reg_range().
Modified:
stable/10/sys/vm/vm_phys.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/vm/vm_phys.c
==============================================================================
--- stable/10/sys/vm/vm_phys.c Tue May 6 12:15:05 2014 (r265434)
+++ stable/10/sys/vm/vm_phys.c Tue May 6 12:20:07 2014 (r265435)
@@ -552,7 +552,9 @@ vm_phys_fictitious_reg_range(vm_paddr_t
#ifdef VM_PHYSSEG_DENSE
pi = atop(start);
- if (pi >= first_page && atop(end) < vm_page_array_size) {
+ if (pi >= first_page && pi < vm_page_array_size + first_page) {
+ if (atop(end) >= vm_page_array_size + first_page)
+ return (EINVAL);
fp = &vm_page_array[pi - first_page];
malloced = FALSE;
} else
More information about the svn-src-stable
mailing list