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));
        }
 
        /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to