Date: Fri, 24 Apr 2015 22:05:13 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281953 - head/sys/kern Message-ID: <201504242205.t3OM5D3J051597@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Apr 24 22:05:12 2015 New Revision: 281953 URL: https://svnweb.freebsd.org/changeset/base/281953 Log: Use correct length for sparse uiomove(). It must be the clipped to the page size, len is the total transfer length, which may be larger than zero_region. Reported and tested by: clusteradm (gjb) Sponsored by: The FreeBSD Foundation X-MFC-With: r281442 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Fri Apr 24 22:04:59 2015 (r281952) +++ head/sys/kern/uipc_shm.c Fri Apr 24 22:05:12 2015 (r281953) @@ -170,7 +170,7 @@ uiomove_object_page(vm_object_t obj, siz if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && !vm_pager_has_page(obj, idx, NULL, NULL)) { VM_OBJECT_WUNLOCK(obj); - return (uiomove(__DECONST(void *, zero_region), len, uio)); + return (uiomove(__DECONST(void *, zero_region), tlen, uio)); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504242205.t3OM5D3J051597>