linux-stable/fs/fuse
Miklos Szeredi e46e084eef Revert "fuse: in fuse_flush only wait if someone wants the return code"
commit 91ec6c8559 upstream.

This reverts commit 5a8bee63b1.

Jürg Billeter reports the following regression:

  Since v6.3-rc1 commit 5a8bee63b1 ("fuse: in fuse_flush only wait if
  someone wants the return code") `fput()` is called asynchronously if a
  file is closed as part of a process exiting, i.e., if there was no
  explicit `close()` before exit.

  If the file was open for writing, also `put_write_access()` is called
  asynchronously as part of the async `fput()`.

  If that newly written file is an executable, attempting to `execve()` the
  new file can fail with `ETXTBSY` if it's called after the writer process
  exited but before the async `fput()` has run.

Reported-and-tested-by: "Jürg Billeter" <j@bitron.ch>
Cc: <stable@vger.kernel.org> # v6.3
Link: https://lore.kernel.org/all/4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch/
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:47:56 +02:00
..
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile
acl.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00
control.c fuse: Remove the control interface for virtio-fs 2022-07-21 16:06:19 +02:00
cuse.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
dax.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
dev.c fuse_dev_ioctl(): switch to fdget() 2023-04-20 22:55:35 -04:00
dir.c fuse: revalidate: don't invalidate if interrupted 2023-07-27 08:56:33 +02:00
file.c Revert "fuse: in fuse_flush only wait if someone wants the return code" 2023-09-13 09:47:56 +02:00
fuse_i.h fuse update for 6.3 2023-02-27 09:53:58 -08:00
inode.c fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT 2023-07-27 08:56:34 +02:00
ioctl.c fuse: ioctl: translate ENOSYS in outarg 2023-07-27 08:56:35 +02:00
readdir.c fs/fuse: Replace kmap() with kmap_local_page() 2022-11-23 09:10:49 +01:00
virtio_fs.c virtio_fs: Modify format for virtio_fs_direct_access 2022-07-26 10:38:58 +02:00
xattr.c fs.idmapped.v6.3 2023-02-20 11:53:11 -08:00