]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r316745
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 26 Apr 2017 23:24:05 +0000 (23:24 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 26 Apr 2017 23:24:05 +0000 (23:24 +0000)
commitce3526a43af9f4fb44b473be3d481303cf77b549
treee5ff17100f27e33d32d3bc84fcb8b177cdfcb8f7
parent3b20098e99b5102015ce63e0ecf73470dbbcb18a
MFC: r316745
Fix the NFS client for "text file modified, process killed" mmap'd case.

When an mmap'd text file is written and then executed immediately
afterwards, it was possible that the modify time would change after the
text file was executing, resulting in the process executing the file
being killed. This was usually only observed when the file system's
times were set to higher resolution, but could have occurred for any
time resolution.
This patch adds a VOP_SET_TEXT() to the NFS client which flushed all
dirty pages to the NFS server and then makes sure that n_mtime is up
to date to avoid this from occurring.
Thanks go to kib@ and pho@ for their help with developing this patch.

The call to ncl_flush() has been removed. If r316532 is merged into stable/10,
this call needs to go back into nfs_set_text().

git-svn-id: svn://svn.freebsd.org/base/stable/10@317476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsclient/nfs_clvnops.c