git: DragonFly_RELEASE_3_8 kernel - Fix sendfile() bugs / nginx

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Aug 23 11:01:43 PDT 2014


commit d3239e3cf3ba0a4d24020f9ca0fb5dde8faff3b1
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Aug 23 10:53:25 2014 -0700

    kernel - Fix sendfile() bugs / nginx
    
    * Fix a sendfile() bug tickled by nginx.  When sending partial file bodies the
      nbytes test was improperly included the header bytes in its file body limit
      test.  This caused sendfile() to return 0 (complete success) but not
      actually output the entirety of the requested file segment.
    
    * sendfile() now holds VM pages instead of wiring them.  Wiring the pages
      prevents truncation operations from succeeded and can further cause a
      kernel panic if the underlying file is deleted and the descriptor is
      closed while mbufs related to the sendfile() are still pending on the
      socket.
    
    Massive-debugging-by: joris

Summary of changes:
 sys/kern/uipc_syscalls.c | 43 +++++++++++++++++++++++++++----------------
 1 file changed, 27 insertions(+), 16 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d3239e3cf3ba0a4d24020f9ca0fb5dde8faff3b1


-- 
DragonFly BSD source repository



More information about the Commits mailing list