TencentOS-kernel/fs
Amir Goldstein 7fd9738ce6 fuse: fix live lock in fuse_iget()
commit 775c5033a0d164622d9d10dd0f0a5531639ed3ed upstream.

Commit 5d069dbe8aaf ("fuse: fix bad inode") replaced make_bad_inode()
in fuse_iget() with a private implementation fuse_make_bad().

The private implementation fails to remove the bad inode from inode
cache, so the retry loop with iget5_locked() finds the same bad inode
and marks it bad forever.

kmsg snip:

[ ] rcu: INFO: rcu_sched self-detected stall on CPU
...
[ ]  ? bit_wait_io+0x50/0x50
[ ]  ? fuse_init_file_inode+0x70/0x70
[ ]  ? find_inode.isra.32+0x60/0xb0
[ ]  ? fuse_init_file_inode+0x70/0x70
[ ]  ilookup5_nowait+0x65/0x90
[ ]  ? fuse_init_file_inode+0x70/0x70
[ ]  ilookup5.part.36+0x2e/0x80
[ ]  ? fuse_init_file_inode+0x70/0x70
[ ]  ? fuse_inode_eq+0x20/0x20
[ ]  iget5_locked+0x21/0x80
[ ]  ? fuse_inode_eq+0x20/0x20
[ ]  fuse_iget+0x96/0x1b0

Fixes: 5d069dbe8aaf ("fuse: fix bad inode")
Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-12 12:53:14 +08:00
..
9p 9P: Cast to loff_t before multiplying 2021-03-16 16:40:11 +08:00
adfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
affs fs/affs: release old buffer head on error path 2021-04-12 12:52:38 +08:00
afs rxrpc: Fix deadlock around release of dst cached on udp tunnel 2021-04-12 12:51:53 +08:00
autofs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
befs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bfs bfs: don't use WARNING: string when it's just info. 2021-03-16 16:43:53 +08:00
btrfs btrfs: scrub: Don't check free space before marking a block group RO 2021-04-12 12:53:13 +08:00
cachefiles cachefiles: Handle readpage error correctly 2021-03-16 16:40:14 +08:00
ceph ceph: fix race in concurrent __ceph_remove_cap invocations 2021-03-16 16:43:35 +08:00
cifs cifs: return proper error code in statfs(2) 2021-04-12 12:52:58 +08:00
coda Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
configfs configfs: fix a use-after-free in __configfs_open_file 2021-04-12 12:53:11 +08:00
cramfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto fscrypt: remove kernel-internal constants from UAPI header 2021-03-16 16:43:49 +08:00
debugfs debugfs: do not attempt to create a new file before the filesystem is initalized 2021-04-12 12:52:10 +08:00
devpts Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dlm fs: dlm: fix configfs memory leak 2021-03-16 16:39:15 +08:00
ecryptfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
efivarfs efivarfs: revert "fix memory leak in efivarfs_create()" 2021-03-16 16:41:45 +08:00
efs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
erofs erofs: fix shift-out-of-bounds of blkszbits 2021-04-12 12:52:44 +08:00
exportfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ext2 ext2: don't update mtime on COW faults 2021-03-16 16:35:36 +08:00
ext4 ext4: fix potential htree index checksum corruption 2021-04-12 12:52:30 +08:00
f2fs f2fs: fix to set/clear I_LINKABLE under i_lock 2021-04-12 12:52:48 +08:00
fat fat: don't allow to mount if the FAT length == 0 2021-03-16 16:29:12 +08:00
freevxfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fscache Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fuse fuse: fix live lock in fuse_iget() 2021-04-12 12:53:14 +08:00
gfs2 gfs2: Recursive gfs2_quota_hold in gfs2_iomap_end 2021-04-12 12:52:40 +08:00
hfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hfsplus hfsplus: fix crash and filesystem corruption when deleting files 2021-03-16 16:26:16 +08:00
hostfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hpfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hugetlbfs mm: hugetlbfs: fix cannot migrate the fallocated HugeTLB page 2021-04-12 12:51:56 +08:00
iomap iomap: fix WARN_ON_ONCE() from unprivileged users 2021-03-16 16:39:20 +08:00
isofs isofs: release buffer head before return 2021-04-12 12:52:25 +08:00
jbd2 jbd2: fix up sparse warnings in checkpoint code 2021-03-16 16:40:54 +08:00
jffs2 jffs2: fix use after free in jffs2_sum_write_data() 2021-04-12 12:52:22 +08:00
jfs JFS: more checks for invalid superblock 2021-04-12 12:52:43 +08:00
kernfs kernfs: do not call fsnotify() with name without a parent 2021-03-16 16:33:35 +08:00
lockd lockd: don't use interval-based rebinding over TCP 2021-03-16 16:42:59 +08:00
minix fs/minix: remove expected error message in block_to_path() 2021-03-16 16:34:21 +08:00
nfs NFSv4.2: fix return value of _nfs4_get_security_label() 2021-04-12 12:53:11 +08:00
nfs_common nfs_common: need lock during iterate through the list 2021-03-16 16:43:09 +08:00
nfsd nfsd: register pernet ops last, unregister first 2021-04-12 12:52:28 +08:00
nilfs2 nilfs2: fix null pointer dereference at nilfs_segctor_do_construct() 2021-03-16 16:29:04 +08:00
nls Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
notify fanotify: fix ignore mask logic for events on child and on dir 2021-03-16 16:28:58 +08:00
ntfs ntfs: check for valid standard information attribute 2021-04-12 12:52:08 +08:00
ocfs2 ocfs2: fix a use after free on error 2021-04-12 12:52:31 +08:00
omfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openpromfs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
orangefs orangefs: get rid of knob code... 2021-03-16 16:34:10 +08:00
overlayfs ovl: expand warning in ovl_d_real() 2021-04-12 12:52:06 +08:00
proc proc: fix lookup in /proc/net subdirectories after setns(2) 2021-04-12 12:51:06 +08:00
pstore pstore: Fix typo in compression option name 2021-04-12 12:52:36 +08:00
qnx4 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
qnx6 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
quota quota: Fix memory leak when handling corrupted quota file 2021-04-12 12:52:22 +08:00
ramfs ramfs: fix nommu mmap with gaps in the page cache 2021-03-16 16:38:58 +08:00
reiserfs reiserfs: add check for an invalid ih_entry_count 2021-03-16 16:43:52 +08:00
romfs romfs: fix uninitialized memory leak in romfs_dev_read() 2021-03-16 16:34:28 +08:00
squashfs squashfs: add more sanity checks in xattr id lookup 2021-04-12 12:52:00 +08:00
sysfs sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output 2021-04-12 12:52:49 +08:00
sysv Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tracefs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ubifs ubifs: Fix error return code in alloc_wbufs() 2021-04-12 12:52:22 +08:00
udf udf: fix silent AED tagLocation corruption 2021-04-12 12:53:02 +08:00
ufs fs/ufs: avoid potential u32 multiplication overflow 2021-03-16 16:34:21 +08:00
unicode Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
verity Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xfs xfs: Fix assert failure in xfs_setattr_size() 2021-04-12 12:52:44 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig.binfmt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
aio.c aio: fix async fsync creds 2021-03-16 16:28:58 +08:00
anon_inodes.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
attr.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
bad_inode.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
binfmt_aout.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
binfmt_elf.c fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info() 2021-03-16 16:28:37 +08:00
binfmt_elf_fdpic.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
binfmt_em86.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
binfmt_flat.c binfmt_flat: revert "binfmt_flat: don't offset the data start" 2021-03-16 16:34:43 +08:00
binfmt_misc.c binfmt_misc: fix possible deadlock in bm_register_write 2021-04-12 12:53:12 +08:00
binfmt_script.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
block_dev.c bdev: Reduce time holding bd_mutex in sync in blkdev_close() 2021-03-16 16:37:13 +08:00
buffer.c fs: Don't invalidate page buffers in block_write_full_page() 2021-03-16 16:39:56 +08:00
char_dev.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
compat.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
compat_binfmt_elf.c BACKPORT: Split the old READ_IMPLIES_EXEC workaround from executable 2021-03-16 16:43:59 +08:00
compat_ioctl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
coredump.c coredump: fix core_pattern parse error 2021-03-16 16:42:04 +08:00
d_path.c fs: fix NULL dereference due to data race in prepend_path() 2021-03-16 16:38:47 +08:00
dax.c mm: provide a saner PTE walking API for modules 2021-04-12 12:52:09 +08:00
dcache.c fix dget_parent() fastpath race 2021-03-16 16:36:39 +08:00
dcookies.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
direct-io.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
drop_caches.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
eventfd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
eventpoll.c ep_create_wakeup_source(): dentry name can change under you... 2021-03-16 16:37:52 +08:00
exec.c exec: Transform exec_update_mutex into a rw_semaphore 2021-04-12 12:51:05 +08:00
fcntl.c fcntl: Fix potential deadlock in send_sig{io, urg}() 2021-03-16 16:43:54 +08:00
fhandle.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
file.c fix multiplication overflow in copy_fdtable() 2021-03-16 16:28:07 +08:00
file_table.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
filesystems.c fs/filesystems.c: downgrade user-reachable WARN_ONCE() to pr_warn_once() 2021-03-16 16:26:14 +08:00
fs-writeback.c fs: fix lazytime expiration handling in __writeback_single_inode() 2021-04-12 12:51:42 +08:00
fs_context.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fs_parser.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fs_pin.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fs_struct.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fs_types.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
fsopen.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
inode.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
internal.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
io_uring.c io_uring: Fix current->fs handling in io_sq_wq_submit_work() 2021-04-12 12:51:41 +08:00
ioctl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
libfs.c libfs: fix error cast of negative value in simple_attr_write() 2021-03-16 16:41:24 +08:00
locks.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mbcache.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mount.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mpage.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
namei.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
namespace.c fs/namespace.c: WARN if mnt_count has become negative 2021-03-16 16:43:56 +08:00
no-block.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nsfs.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
open.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pipe.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pnode.c propagate_one(): mnt_set_mountpoint() needs mount_lock 2021-03-16 16:27:06 +08:00
pnode.h mount: fix mounting of detached mounts onto targets that reside on shared mounts 2021-04-12 12:52:58 +08:00
posix_acl.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
proc_namespace.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
read_write.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
readdir.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
select.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
seq_file.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
signalfd.c fs/signalfd.c: fix inconsistent return codes for signalfd4 2021-03-16 16:34:34 +08:00
splice.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stack.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
stat.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
statfs.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
super.c vfs: remove lockdep bogosity in __sb_start_write 2021-03-16 16:41:11 +08:00
sync.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
timerfd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
userfaultfd.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
utimes.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
xattr.c xattr: break delegations in {set,remove}xattr 2021-03-16 16:33:08 +08:00