Date: Wed, 4 Dec 2019 19:46:48 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355399 - head/sys/vm Message-ID: <201912041946.xB4Jkmxm053008@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912041946.xB4Jkmxm053008>