Make sendfile(2) more robust against file change. This fixes a possible
authorglebius <glebius@FreeBSD.org>
Fri, 24 Mar 2017 16:01:19 +0000 (16:01 +0000)
committerglebius <glebius@FreeBSD.org>
Fri, 24 Mar 2017 16:01:19 +0000 (16:01 +0000)
commit90dea6dcb15a234480e7c554b0cafd6a6850cbf1
treecd6699d61a0fa0a6982dea54fe092f9dcdd7bbfb
parent79c4a0ad28dacfc79253dfe2b854374072138bc4
Make sendfile(2) more robust against file change.  This fixes a possible
crash when the file shrinks.  This also fixes sendfile(2) not sending more
data in a case when the file grows, and the request is open-ended or
specifies a size that is greater than old file size.

PR: 217789
Reviewed by: gallatin
MFC after: 10 days
sys/kern/kern_sendfile.c