bisecting fixing commit since eb575cd5d7f60241d016fdd13a9e86d962093c9b building syzkaller on 9d2ab5dfe7727dfea4b9b279f4edf731acb386ef testing commit eb575cd5d7f60241d016fdd13a9e86d962093c9b compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 26e017c4909bb8810369c2033b3ed65d013d7982600fcf4924e9d8b090dfa108 all runs: crashed: possible deadlock in fuse_reverse_inval_entry testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 7aa39f3a3f5440ac2d8ba1f113d6f9c03966dcc0907b662dccd72635c337993b all runs: crashed: possible deadlock in fuse_reverse_inval_entry revisions tested: 2, total time: 26m38.055383738s (build: 19m25.778498708s, test: 6m30.14626321s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: possible deadlock in fuse_reverse_inval_entry wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ieee80211 phy8: Selected rate control algorithm 'minstrel_ht' ============================================ WARNING: possible recursive locking detected 4.19.204-syzkaller #0 Not tainted IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready -------------------------------------------- syz-executor.1/9839 is trying to acquire lock: 0000000046cd2036 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] 0000000046cd2036 (&type->i_mutex_dir_key#8){++++}, at: fuse_reverse_inval_entry+0x288/0x5c0 fs/fuse/dir.c:1006 but task is already holding lock: 00000000feb1593d (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] 00000000feb1593d (&type->i_mutex_dir_key#8){++++}, at: fuse_reverse_inval_entry+0x9a/0x5c0 fs/fuse/dir.c:987 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&type->i_mutex_dir_key#8); lock(&type->i_mutex_dir_key#8); *** DEADLOCK *** May be due to missing lock nesting notation 2 locks held by syz-executor.1/9839: #0: 0000000022f668ff (&fc->killsb){.+.+}, at: fuse_notify_delete fs/fuse/dev.c:1582 [inline] #0: 0000000022f668ff (&fc->killsb){.+.+}, at: fuse_notify fs/fuse/dev.c:1819 [inline] #0: 0000000022f668ff (&fc->killsb){.+.+}, at: fuse_dev_do_write+0x1a83/0x2480 fs/fuse/dev.c:1894 #1: 00000000feb1593d (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 00000000feb1593d (&type->i_mutex_dir_key#8){++++}, at: fuse_reverse_inval_entry+0x9a/0x5c0 fs/fuse/dir.c:987 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 stack backtrace: CPU: 0 PID: 9839 Comm: syz-executor.1 Not tainted 4.19.204-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 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.40+0x344/0x744 kernel/locking/lockdep.c:3416 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 lock_acquire+0x180/0x3a0 kernel/locking/lockdep.c:3908 down_write+0x38/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] fuse_reverse_inval_entry+0x288/0x5c0 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+0xbad/0x2480 fs/fuse/dev.c:1894 fuse_dev_write+0x121/0x1a0 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+0x443/0x890 fs/read_write.c:487 vfs_write+0x150/0x4d0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 ieee80211 phy9: Selected rate control algorithm 'minstrel_ht' __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:608 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready entry_SYSCALL_64_after_hwframe+0x49/0xbe wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 RIP: 0033:0x4665d9 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8032b98188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 000000000000002e RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd6c8a265f R14: 00007f8032b98300 R15: 0000000000022000 ieee80211 phy10: Selected rate control algorithm 'minstrel_ht' Bluetooth: hci0: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy11: Selected rate control algorithm 'minstrel_ht' ieee80211 phy12: Selected rate control algorithm 'minstrel_ht' IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy14: Selected rate control algorithm 'minstrel_ht' IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Bluetooth: hci2: command 0x0419 tx timeout wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 Bluetooth: hci4: command 0x0419 tx timeout wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 Bluetooth: hci3: command 0x0419 tx timeout ieee80211 phy15: Selected rate control algorithm 'minstrel_ht' Bluetooth: hci5: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready Bluetooth: hci1: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ---------------- Code disassembly (best guess), 1 bytes skipped: 0: ff c3 inc %ebx 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 9: 00 00 00 c: 0f 1f 40 00 nopl 0x0(%rax) 10: 48 89 f8 mov %rdi,%rax 13: 48 89 f7 mov %rsi,%rdi 16: 48 89 d6 mov %rdx,%rsi 19: 48 89 ca mov %rcx,%rdx 1c: 4d 89 c2 mov %r8,%r10 1f: 4d 89 c8 mov %r9,%r8 22: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9 27: 0f 05 syscall * 29: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction 2f: 73 01 jae 0x32 31: c3 retq 32: 48 c7 c1 bc ff ff ff mov $0xffffffffffffffbc,%rcx 39: f7 d8 neg %eax 3b: 64 89 01 mov %eax,%fs:(%rcx) 3e: 48 rex.W