svn commit: r355399 - head/sys/vm
Mark Johnston
markj at FreeBSD.org
Wed Dec 4 19:46:49 UTC 2019
Author: markj
Date: Wed Dec 4 19:46:48 2019
New Revision: 355399
URL: https://svnweb.freebsd.org/changeset/base/355399
Log:
Fix an off-by-one error in vm_map_pmap_enter().
If the starting pindex is equal to object->size, there is nothing to do.
This was harmless since the rest of vm_map_pmap_enter() has no effect
when psize == 0.
Submitted by: Wuyang Chung <wuyang.chung1 at gmail.com>
Reviewed by: alc, dougm, kib
MFC after: 1 week
Github PR: https://github.com/freebsd/freebsd/pull/417
Differential Revision: https://reviews.freebsd.org/D22678
Modified:
head/sys/vm/vm_map.c
Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c Wed Dec 4 18:40:05 2019 (r355398)
+++ head/sys/vm/vm_map.c Wed Dec 4 19:46:48 2019 (r355399)
@@ -2467,7 +2467,7 @@ vm_map_pmap_enter(vm_map_t map, vm_offset_t addr, vm_p
psize = atop(size);
if (psize + pindex > object->size) {
- if (object->size < pindex) {
+ if (pindex >= object->size) {
VM_OBJECT_RUNLOCK(object);
return;
}
More information about the svn-src-all
mailing list