WSL2-Linux-Kernel/fs/fuse
Miklos Szeredi f2fb18d429 fuse: lock inode unconditionally in fuse_fallocate()
commit 44361e8cf9 upstream.

file_modified() must be called with inode lock held.  fuse_fallocate()
didn't lock the inode in case of just FALLOC_KEEP_SIZE flags value, which
resulted in a kernel Warning in notify_change().

Lock the inode unconditionally, like all other fallocate implementations
do.

Reported-by: Pengfei Xu <pengfei.xu@intel.com>
Reported-and-tested-by: syzbot+462da39f0667b357c4b6@syzkaller.appspotmail.com
Fixes: 4a6f278d48 ("fuse: add file_modified() to fallocate")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-02 17:41:11 +01:00
..
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
control.c fuse: Remove the control interface for virtio-fs 2022-08-17 14:24:11 +02:00
cuse.c cuse: simplify refcount 2021-04-14 10:40:58 +02:00
dax.c \n 2021-08-30 10:24:50 -07:00
dev.c fuse: fix pipe buffer lifetime for direct_io 2022-03-16 14:23:42 +01:00
dir.c fuse: annotate lock in fuse_reverse_inval_entry() 2021-12-22 09:32:50 +01:00
file.c fuse: lock inode unconditionally in fuse_fallocate() 2022-12-02 17:41:11 +01:00
fuse_i.h fuse: fix pipe buffer lifetime for direct_io 2022-03-16 14:23:42 +01:00
inode.c fuse: limit nsec 2022-08-17 14:22:56 +02:00
ioctl.c fuse: ioctl: translate ENOSYS 2022-08-17 14:22:56 +02:00
readdir.c fuse: fix readdir cache race 2022-11-16 09:58:13 +01:00
virtio_fs.c fuse: clean up fuse_mount destruction 2021-10-21 10:01:39 +02:00
xattr.c fuse: extend FUSE_SETXATTR request 2021-04-14 10:40:57 +02:00