HomeFreeBSD

Fix the NFS client for "text file modified, process killed" mmap'd case.

Description

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 was reported on a recent email list discussion.
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.

Tested by: pho
Reviewed by: kib
MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on
Reviewer
kib
Parents
rS316744: sh: Reduce size of limits table.
Branches
Unknown
Tags
Unknown