android_kernel_xiaomi_sm8450/fs/fuse
Hangyu Hua 851783a0c4 fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
commit 7f8ed28d1401320bcb02dda81b3c23ab2dc5a6d8 upstream.

fuse_dax_conn_free() will be called when fuse_fill_super_common() fails
after fuse_dax_conn_alloc(). Then deactivate_locked_super() in
virtio_fs_get_tree() will call virtio_kill_sb() to release the discarded
superblock. This will call fuse_dax_conn_free() again in fuse_conn_put(),
resulting in a possible double free.

Fixes: 1dd539577c ("virtiofs: add a mount option to enable dax")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: <stable@vger.kernel.org> # v5.10
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-20 15:44:30 +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: dax: set fc->dax to NULL in fuse_dax_conn_free() 2023-12-20 15:44:30 +01:00
dev.c fuse: fix pipe buffer lifetime for direct_io 2022-03-16 14:16:01 +01:00
dir.c fuse: revalidate: don't invalidate if interrupted 2023-07-27 08:44:34 +02:00
file.c fuse: fix deadlock between atomic O_TRUNC and page invalidation 2023-04-26 11:27:41 +02:00
fuse_i.h virtiofs: split requests that exceed virtqueue size 2023-04-26 11:27:40 +02:00
inode.c fuse: check s_root when destroying sb 2023-04-26 11:27:40 +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: nlookup missing decrement in fuse_direntplus_link 2023-09-19 12:20:27 +02:00
virtio_fs.c fuse: check s_root when destroying sb 2023-04-26 11:27:40 +02:00
xattr.c fuse: fix bad inode 2021-01-09 13:46:24 +01:00