Date: Sun, 26 Feb 2017 10:58:01 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314297 - stable/11/sys/kern Message-ID: <201702261058.v1QAw1fV060731@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Feb 26 10:58:01 2017 New Revision: 314297 URL: https://svnweb.freebsd.org/changeset/base/314297 Log: MFC r313688: Switch copyout_map() to use vm_mmap_object() instead of vm_mmap(). Modified: stable/11/sys/kern/subr_uio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_uio.c ============================================================================== --- stable/11/sys/kern/subr_uio.c Sun Feb 26 10:53:02 2017 (r314296) +++ stable/11/sys/kern/subr_uio.c Sun Feb 26 10:58:01 2017 (r314297) @@ -468,10 +468,11 @@ copyout_map(struct thread *td, vm_offset /* round size up to page boundary */ size = (vm_size_t)round_page(sz); - - error = vm_mmap(&vms->vm_map, addr, size, VM_PROT_READ | VM_PROT_WRITE, - VM_PROT_ALL, MAP_PRIVATE | MAP_ANON, OBJT_DEFAULT, NULL, 0); - + if (size == 0) + return (EINVAL); + error = vm_mmap_object(&vms->vm_map, addr, size, VM_PROT_READ | + VM_PROT_WRITE, VM_PROT_ALL, MAP_PRIVATE | MAP_ANON, NULL, 0, + FALSE, td); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702261058.v1QAw1fV060731>