============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/19243 is trying to acquire lock: 000000005a14c412 (&type->i_mutex_dir_key#12){++++}, at: inode_lock include/linux/fs.h:748 [inline] 000000005a14c412 (&type->i_mutex_dir_key#12){++++}, at: fuse_reverse_inval_entry+0x2e1/0x660 fs/fuse/dir.c:1006 but task is already holding lock: 000000006cb2fa01 (&type->i_mutex_dir_key#12){++++}, at: inode_lock include/linux/fs.h:748 [inline] 000000006cb2fa01 (&type->i_mutex_dir_key#12){++++}, 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#12); lock(&type->i_mutex_dir_key#12); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor.1/19243: #0: 0000000028426faf (&fc->killsb){++++}, at: fuse_notify_delete fs/fuse/dev.c:1582 [inline] #0: 0000000028426faf (&fc->killsb){++++}, at: fuse_notify fs/fuse/dev.c:1819 [inline] #0: 0000000028426faf (&fc->killsb){++++}, at: fuse_dev_do_write+0x2343/0x2bc0 fs/fuse/dev.c:1894 #1: 000000006cb2fa01 (&type->i_mutex_dir_key#12){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 000000006cb2fa01 (&type->i_mutex_dir_key#12){++++}, at: fuse_reverse_inval_entry+0xaa/0x660 fs/fuse/dir.c:987 stack backtrace: CPU: 0 PID: 19243 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 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:0x7f87587f85a9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007f8756d6b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f8758918f80 RCX: 00007f87587f85a9 RDX: 000000000000002c RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f87588537b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe37f296cf R14: 00007f8756d6b300 R15: 0000000000022000 input: syz1 as /devices/virtual/input/input15 audit: type=1804 audit(1667515943.642:103): pid=19254 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir406207184/syzkaller.kSuMTx/224/bus" dev="sda1" ino=13947 res=1 input: syz1 as /devices/virtual/input/input16 input: syz1 as /devices/virtual/input/input17 audit: type=1804 audit(1667515943.682:104): pid=19263 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir3840341209/syzkaller.SBajAM/249/bus" dev="sda1" ino=13885 res=1 input: syz1 as /devices/virtual/input/input18 input: syz1 as /devices/virtual/input/input19 audit: type=1804 audit(1667515943.812:105): pid=19281 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir3840341209/syzkaller.SBajAM/250/bus" dev="sda1" ino=13957 res=1 input: syz1 as /devices/virtual/input/input20 audit: type=1804 audit(1667515943.992:106): pid=19300 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir3840341209/syzkaller.SBajAM/251/bus" dev="sda1" ino=13975 res=1 input: syz1 as /devices/virtual/input/input21 IPVS: ftp: loaded support on port[0] = 21 audit: type=1804 audit(1667515944.412:107): pid=19346 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir406207184/syzkaller.kSuMTx/225/bus" dev="sda1" ino=14037 res=1 IPVS: ftp: loaded support on port[0] = 21 tmpfs: Bad value 'x' for mount option 'nr_inodes' tmpfs: Bad value 'x' for mount option 'nr_inodes' audit: type=1804 audit(1667515945.242:108): pid=19448 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir406207184/syzkaller.kSuMTx/226/bus" dev="sda1" ino=13975 res=1 tmpfs: Bad value 'x' for mount option 'nr_inodes' IPVS: ftp: loaded support on port[0] = 21 tmpfs: Bad value 'x' for mount option 'nr_inodes' IPVS: ftp: loaded support on port[0] = 21 EXT4-fs error (device sda1): mb_free_blocks:1452: group 5, inode 14145: block 164896:freeing already freed block (bit 1056); block bitmap corrupt. EXT4-fs error (device sda1): ext4_mb_generate_buddy:744: group 5, block bitmap and bg descriptor inconsistent: 17356 vs 17357 free clusters EXT4-fs (sda1): pa 000000001eba4934: logic 0, phys. 164896, len 32 EXT4-fs error (device sda1): ext4_mb_release_inode_pa:3864: group 5, free 16, pa_free 15 audit: type=1804 audit(1667515946.322:109): pid=19596 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3185288827/syzkaller.AyTnfC/237/bus" dev="sda1" ino=14162 res=1 audit: type=1800 audit(1667515946.322:110): pid=19596 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14162 res=0 EXT4-fs error (device sda1): mb_free_blocks:1452: group 8, inode 14451: block 268288:freeing already freed block (bit 6144); block bitmap corrupt. EXT4-fs error (device sda1): ext4_mb_generate_buddy:744: group 8, block bitmap and bg descriptor inconsistent: 32705 vs 32706 free clusters EXT4-fs (sda1): pa 00000000c4c1d16b: logic 0, phys. 268288, len 32 EXT4-fs error (device sda1): ext4_mb_release_inode_pa:3864: group 8, free 16, pa_free 15 EXT4-fs (sda1): pa 00000000dee893b2: logic 0, phys. 268320, len 32 EXT4-fs error (device sda1): ext4_mb_release_inode_pa:3864: group 8, free 16, pa_free 15 audit: type=1804 audit(1667515947.232:111): pid=19636 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3185288827/syzkaller.AyTnfC/238/bus" dev="sda1" ino=14372 res=1 EXT4-fs error (device sda1): mb_free_blocks:1452: group 11, inode 13911: block 366592:freeing already freed block (bit 6144); block bitmap corrupt. EXT4-fs error (device sda1): ext4_mb_generate_buddy:744: group 11, block bitmap and bg descriptor inconsistent: 26593 vs 26594 free clusters EXT4-fs (sda1): pa 000000007c21bbbb: logic 0, phys. 366592, len 32 EXT4-fs error (device sda1): ext4_mb_release_inode_pa:3864: group 11, free 16, pa_free 15 EXT4-fs (sda1): pa 000000009b69c7bf: logic 0, phys. 399200, len 32 kauditd_printk_skb: 1 callbacks suppressed audit: type=1804 audit(1667515948.152:113): pid=19676 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir3185288827/syzkaller.AyTnfC/239/bus" dev="sda1" ino=14532 res=1 audit: type=1800 audit(1667515948.152:114): pid=19676 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.3" name="bus" dev="sda1" ino=14532 res=0 EXT4-fs (sda1): pa 000000000f96482d: logic 0, phys. 523776, len 32 audit: type=1804 audit(1667515949.702:115): pid=19706 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.5" name="/root/syzkaller-testdir1298631580/syzkaller.q7Y3cl/283/bus" dev="sda1" ino=14563 res=1 audit: type=1800 audit(1667515949.702:116): pid=19706 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.5" name="bus" dev="sda1" ino=14563 res=0 audit: type=1804 audit(1667515949.902:117): pid=19708 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir406207184/syzkaller.kSuMTx/234/bus" dev="sda1" ino=14580 res=1