Author: alc
Date: Thu Jun 15 18:49:46 2017
New Revision: 319985
URL: https://svnweb.freebsd.org/changeset/base/319985

Log:
  MFC r319540
    The data type returned by vmoff() is too narrow in its range.  This could
    break the transmission of files longer than 4 GB on 32-bit architectures.
  
  Approved by:  re (gjb)

Modified:
  stable/11/sys/kern/kern_sendfile.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_sendfile.c
==============================================================================
--- stable/11/sys/kern/kern_sendfile.c  Thu Jun 15 17:46:20 2017        
(r319984)
+++ stable/11/sys/kern/kern_sendfile.c  Thu Jun 15 18:49:46 2017        
(r319985)
@@ -207,12 +207,12 @@ xfsize(int i, int n, off_t off, off_t len)
 /*
  * Helper function to get offset within object for i page.
  */
-static inline vm_offset_t
+static inline vm_ooffset_t
 vmoff(int i, off_t off)
 {
 
        if (i == 0)
-               return ((vm_offset_t)off);
+               return ((vm_ooffset_t)off);
 
        return (trunc_page(off + i * PAGE_SIZE));
 }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to