svn commit: r314590 - stable/10/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Fri Mar 3 10:17:17 UTC 2017
Author: kib
Date: Fri Mar 3 10:17:16 2017
New Revision: 314590
URL: https://svnweb.freebsd.org/changeset/base/314590
Log:
MFC r314195:
Properly handle possible underflow in vm_fault_prefault().
Modified:
stable/10/sys/vm/vm_fault.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/vm/vm_fault.c
==============================================================================
--- stable/10/sys/vm/vm_fault.c Fri Mar 3 10:02:56 2017 (r314589)
+++ stable/10/sys/vm/vm_fault.c Fri Mar 3 10:17:16 2017 (r314590)
@@ -1140,11 +1140,12 @@ vm_fault_prefault(const struct faultstat
}
entry = fs->entry;
- starta = addra - backward * PAGE_SIZE;
- if (starta < entry->start) {
+ if (addra < backward * PAGE_SIZE) {
starta = entry->start;
- } else if (starta > addra) {
- starta = 0;
+ } else {
+ starta = addra - backward * PAGE_SIZE;
+ if (starta < entry->start)
+ starta = entry->start;
}
/*
More information about the svn-src-stable-10
mailing list