============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.0/17357 is trying to acquire lock: 00000000a9c34edc (&type->i_mutex_dir_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] 00000000a9c34edc (&type->i_mutex_dir_key#10){++++}, at: fuse_reverse_inval_entry+0x2e1/0x660 fs/fuse/dir.c:1006 but task is already holding lock: 00000000fcc7c335 (&type->i_mutex_dir_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] 00000000fcc7c335 (&type->i_mutex_dir_key#10){++++}, at: fuse_reverse_inval_entry+0xaa/0x660 fs/fuse/dir.c:987 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&type->i_mutex_dir_key#10); lock(&type->i_mutex_dir_key#10); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor.0/17357: #0: 00000000cb3e44e4 (&fc->killsb){++++}, at: fuse_notify_delete fs/fuse/dev.c:1582 [inline] #0: 00000000cb3e44e4 (&fc->killsb){++++}, at: fuse_notify fs/fuse/dev.c:1819 [inline] #0: 00000000cb3e44e4 (&fc->killsb){++++}, at: fuse_dev_do_write+0x2343/0x2bc0 fs/fuse/dev.c:1894 #1: 00000000fcc7c335 (&type->i_mutex_dir_key#10){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000fcc7c335 (&type->i_mutex_dir_key#10){++++}, at: fuse_reverse_inval_entry+0xaa/0x660 fs/fuse/dir.c:987 stack backtrace: CPU: 0 PID: 17357 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] fuse_reverse_inval_entry+0x2e1/0x660 fs/fuse/dir.c:1006 fuse_notify_delete fs/fuse/dev.c:1585 [inline] fuse_notify fs/fuse/dev.c:1819 [inline] fuse_dev_do_write+0x239e/0x2bc0 fs/fuse/dev.c:1894 fuse_dev_write+0x153/0x1e0 fs/fuse/dev.c:1978 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fc3954630c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc3939b4168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fc395583050 RCX: 00007fc3954630c9 RDX: 000000000000002a RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00007fc3954beae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb74b2d0f R14: 00007fc3939b4300 R15: 0000000000022000 netlink: 1204 bytes leftover after parsing attributes in process `syz-executor.4'. caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect netlink: 16 bytes leftover after parsing attributes in process `syz-executor.4'. caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect audit: type=1400 audit(1674957970.494:8): apparmor="DENIED" operation="stack" info="label not found" error=-2 profile="unconfined" name="x%$#!{" pid=17600 comm="syz-executor.2" caif:caif_disconnect_client(): nothing to disconnect audit: type=1400 audit(1674957970.604:9): apparmor="DENIED" operation="stack" info="label not found" error=-2 profile="unconfined" name="x%$#!{" pid=17622 comm="syz-executor.2" audit: type=1400 audit(1674957970.674:10): apparmor="DENIED" operation="stack" info="label not found" error=-2 profile="unconfined" name="x%$#!{" pid=17641 comm="syz-executor.2" caif:caif_disconnect_client(): nothing to disconnect audit: type=1400 audit(1674957970.744:11): apparmor="DENIED" operation="stack" info="label not found" error=-2 profile="unconfined" name="x%$#!{" pid=17653 comm="syz-executor.2" caif:caif_disconnect_client(): nothing to disconnect netlink: 'syz-executor.3': attribute type 1 has an invalid length. netlink: 1164 bytes leftover after parsing attributes in process `syz-executor.3'. audit: type=1400 audit(1674957970.924:12): apparmor="DENIED" operation="change_profile" info="label not found" error=-2 profile="unconfined" name="/proc/thread-self/attr/current" pid=17688 comm="syz-executor.2" caif:caif_disconnect_client(): nothing to disconnect 9pnet: Could not find request transport: v AppArmor: change_hat: Invalid input, NULL hat and NULL magic caif:caif_disconnect_client(): nothing to disconnect IPVS: set_ctl: invalid protocol: 0 172.20.20.170:0 caif:caif_disconnect_client(): nothing to disconnect netlink: 16 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.0'. F2FS-fs (loop4): invalid crc value F2FS-fs (loop4): Found nat_bits in checkpoint F2FS-fs (loop4): Mounted with checkpoint version = 48b305e4 audit: type=1800 audit(1674957975.224:13): pid=18340 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.2" name="SYSV00000000" dev="hugetlbfs" ino=65538 res=0 audit: type=1800 audit(1674957975.364:14): pid=18347 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.2" name="SYSV00000000" dev="hugetlbfs" ino=163844 res=0 audit: type=1800 audit(1674957975.484:15): pid=18352 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed comm="syz-executor.2" name="SYSV00000000" dev="hugetlbfs" ino=262150 res=0 audit: type=1800 audit(1674957975.654:16): pid=18341 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14732 res=0 XFS (loop0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop0): DAX unsupported by block device. Turning off DAX. XFS (loop0): Mounting V4 Filesystem XFS (loop0): Ending clean mount XFS (loop0): Quotacheck needed: Please wait. XFS (loop0): Size Freespace BTree record corruption in AG 0 detected! XFS (loop0): start block 0x10042 block count 0x7fbe XFS (loop0): Quotacheck: Done. XFS (loop0): Unmounting Filesystem F2FS-fs (loop4): invalid crc value F2FS-fs (loop4): Found nat_bits in checkpoint F2FS-fs (loop2): invalid crc value F2FS-fs (loop2): Found nat_bits in checkpoint F2FS-fs (loop4): Mounted with checkpoint version = 48b305e4 F2FS-fs (loop1): invalid crc value F2FS-fs (loop1): Found nat_bits in checkpoint XFS (loop0): DAX enabled. Warning: EXPERIMENTAL, use at your own risk XFS (loop0): DAX unsupported by block device. Turning off DAX. XFS (loop0): Mounting V4 Filesystem XFS (loop0): Ending clean mount XFS (loop0): Quotacheck needed: Please wait. XFS (loop0): Size Freespace BTree record corruption in AG 0 detected! XFS (loop0): start block 0x10042 block count 0x7fbe XFS (loop0): Quotacheck: Done. XFS (loop0): Unmounting Filesystem