svn commit: r353666 - head/sys/vm

Mark Johnston markj at FreeBSD.org
Wed Oct 16 21:47:59 UTC 2019


Author: markj
Date: Wed Oct 16 21:47:58 2019
New Revision: 353666
URL: https://svnweb.freebsd.org/changeset/base/353666

Log:
  Correct the range boundaries used by kern_mincore().
  
  Reported by:	alc
  Sponsored by:	Netflix

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==============================================================================
--- head/sys/vm/vm_mmap.c	Wed Oct 16 21:46:49 2019	(r353665)
+++ head/sys/vm/vm_mmap.c	Wed Oct 16 21:47:58 2019	(r353666)
@@ -800,7 +800,7 @@ kern_mincore(struct thread *td, uintptr_t addr0, size_
 	 * mode.
 	 */
 	first_addr = addr = trunc_page(addr0);
-	end = addr + (vm_size_t)round_page(len);
+	end = round_page(addr0 + len);
 	map = &td->td_proc->p_vmspace->vm_map;
 	if (end > vm_map_max(map) || end < addr)
 		return (ENOMEM);


More information about the svn-src-head mailing list