linux/fs/fuse
Miklos Szeredi 035ff33cf4 fuse: write inode in fuse_release()
A race between write(2) and close(2) allows pages to be dirtied after
fuse_flush -> write_inode_now().  If these pages are not flushed from
fuse_release(), then there might not be a writable open file later.  So any
remaining dirty pages must be written back before the file is released.

This is a partial revert of the blamed commit.

Reported-by: syzbot+6e1efbd8efaaa6860e91@syzkaller.appspotmail.com
Fixes: 36ea23374d ("fuse: write inode in fuse_vma_close() instead of fuse_release()")
Cc: <stable@vger.kernel.org> # v5.16
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2022-07-21 16:02:45 +02:00
..
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
control.c fuse: remove reliance on bdi congestion 2022-03-22 15:57:00 -07:00
cuse.c cuse: simplify refcount 2021-04-14 10:40:58 +02:00
dax.c dax: introduce DAX_RECOVERY_WRITE dax access mode 2022-05-16 13:35:56 -07:00
dev.c fuse: remove reliance on bdi congestion 2022-03-22 15:57:00 -07:00
dir.c fuse: Convert fuse to read_folio 2022-05-09 16:21:45 -04:00
file.c fuse: write inode in fuse_release() 2022-07-21 16:02:45 +02:00
fuse_i.h fs: Remove ->readpages address space operation 2022-04-01 13:45:33 -04:00
inode.c fs: allocate inode by using alloc_inode_sb() 2022-03-22 15:57:03 -07:00
ioctl.c x86: Remove toolchain check for X32 ABI capability 2022-03-15 10:32:48 +01:00
Kconfig dax: remove CONFIG_DAX_DRIVER 2021-12-04 08:58:51 -08:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
readdir.c fuse: only update necessary attributes 2021-10-28 09:45:33 +02:00
virtio_fs.c dax: introduce DAX_RECOVERY_WRITE dax access mode 2022-05-16 13:35:56 -07:00
xattr.c fuse: move fuse_invalidate_attr() into fuse_update_ctime() 2021-10-22 17:03:01 +02:00