linux/fs/fuse
Miklos Szeredi 4801672fb0 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:40:07 +01:00
..
acl.c fuse: fix bad inode 2021-01-09 13:46:24 +01:00
control.c fuse: Remove the control interface for virtio-fs 2022-08-21 15:16:10 +02:00
cuse.c cuse: prevent clone 2021-05-19 10:12:56 +02:00
dax.c fuse: split fuse_mount off of fuse_conn 2020-09-18 15:17:41 +02:00
dev.c fuse: fix pipe buffer lifetime for direct_io 2022-03-16 14:16:01 +01:00
dir.c fuse: annotate lock in fuse_reverse_inval_entry() 2021-12-22 09:30:58 +01:00
file.c fuse: lock inode unconditionally in fuse_fallocate() 2022-12-02 17:40:07 +01:00
fuse_i.h fuse: fix pipe buffer lifetime for direct_io 2022-03-16 14:16:01 +01:00
inode.c fuse: limit nsec 2022-08-21 15:15:25 +02:00
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile virtiofs: add a mount option to enable dax 2020-09-10 11:39:22 +02:00
readdir.c fuse: fix readdir cache race 2022-11-16 09:57:07 +01:00
virtio_fs.c virtiofs: fix userns 2021-05-19 10:12:56 +02:00
xattr.c fuse: fix bad inode 2021-01-09 13:46:24 +01:00