summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-03-08 21:50:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-27 15:39:01 +0300
commitba50ea456f49f401ddea107ca9bae5d4d2ec0234 (patch)
treeb1ea42c33404609d7068d71726637f02d76110cd /tools/perf/scripts/python
parent67e4860eeed86a1eec0a86467723f95cbd785076 (diff)
downloadlinux-ba50ea456f49f401ddea107ca9bae5d4d2ec0234.tar.xz
ext4: fix fallocate to use file_modified to update permissions consistently
commit ad5cd4f4ee4d5fcdb1bfb7a0c073072961e70783 upstream. Since the initial introduction of (posix) fallocate back at the turn of the century, it has been possible to use this syscall to change the user-visible contents of files. This can happen by extending the file size during a preallocation, or through any of the newer modes (punch, zero, collapse, insert range). Because the call can be used to change file contents, we should treat it like we do any other modification to a file -- update the mtime, and drop set[ug]id privileges/capabilities. The VFS function file_modified() does all this for us if pass it a locked inode, so let's make fallocate drop permissions correctly. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20220308185043.GA117678@magnolia Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions