summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2019-10-23 14:26:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 12:09:18 +0100
commiteb4b7a625cfe7e87343b1458329c23c53d4bde59 (patch)
treef7f3aee9c8a2890137dff5d44e3293326335f0be /tools/perf/scripts/python
parentd7619be74f341630989c7edfd21a9ed8f51ab2d1 (diff)
fuse: flush dirty data/metadata before non-truncate setattr
commit b24e7598db62386a95a3c8b9c75630c5d56fe077 upstream. If writeback cache is enabled, then writes might get reordered with chmod/chown/utimes. The problem with this is that performing the write in the fuse daemon might itself change some of these attributes. In such case the following sequence of operations will result in file ending up with the wrong mode, for example: int fd = open ("suid", O_WRONLY|O_CREAT|O_EXCL); write (fd, "1", 1); fchown (fd, 0, 0); fchmod (fd, 04755); close (fd); This patch fixes this by flushing pending writes before performing chown/chmod/utimes. Reported-by: Giuseppe Scrivano <gscrivan@redhat.com> Tested-by: Giuseppe Scrivano <gscrivan@redhat.com> Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on") Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions