bisecting fixing commit since eb575cd5d7f60241d016fdd13a9e86d962093c9b building syzkaller on 9d2ab5dfe7727dfea4b9b279f4edf731acb386ef testing commit eb575cd5d7f60241d016fdd13a9e86d962093c9b compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 12d976ce710b3fd5e31921e7728e7735dc9209b3340400d1d57437a3c4a3cf9f all runs: crashed: possible deadlock in fuse_reverse_inval_entry testing current HEAD 4938296e03bd227e5020d63d418956fe52baf97c testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 3f647a0a6a7db29d9fead2a8ada475cc030ea8652614bb723cc6f8e83b0a2c1a all runs: crashed: possible deadlock in fuse_reverse_inval_entry revisions tested: 2, total time: 29m6.959635872s (build: 21m12.708334617s, test: 7m5.248933204s) the crash still happens on HEAD commit msg: Linux 4.19.198 crash: possible deadlock in fuse_reverse_inval_entry Bluetooth: hci2: command 0x0419 tx timeout Bluetooth: hci3: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready Bluetooth: hci5: command 0x0419 tx timeout ============================================ WARNING: possible recursive locking detected wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 4.19.198-syzkaller #0 Not tainted -------------------------------------------- wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 syz-executor.4/9877 is trying to acquire lock: 000000007986b29d (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] 000000007986b29d (&type->i_mutex_dir_key#8){++++}, at: fuse_reverse_inval_entry+0x288/0x5c0 fs/fuse/dir.c:1006 but task is already holding lock: 0000000086a13fdd (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] 0000000086a13fdd (&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 ---- IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready 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.4/9877: #0: 00000000b5f139d2 (&fc->killsb){.+.+}, at: fuse_notify_delete fs/fuse/dev.c:1582 [inline] #0: 00000000b5f139d2 (&fc->killsb){.+.+}, at: fuse_notify fs/fuse/dev.c:1819 [inline] #0: 00000000b5f139d2 (&fc->killsb){.+.+}, at: fuse_dev_do_write+0x1a83/0x2480 fs/fuse/dev.c:1894 #1: 0000000086a13fdd (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #1: 0000000086a13fdd (&type->i_mutex_dir_key#8){++++}, at: fuse_reverse_inval_entry+0x9a/0x5c0 fs/fuse/dir.c:987 stack backtrace: CPU: 1 PID: 9877 Comm: syz-executor.4 Not tainted 4.19.198-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 ieee80211 phy12: Selected rate control algorithm 'minstrel_ht' IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready lock_acquire+0x180/0x3a0 kernel/locking/lockdep.c:3908 down_write+0x38/0x90 kernel/locking/rwsem.c:70 wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 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 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' fuse_dev_write+0x121/0x1a0 fs/fuse/dev.c:1978 IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready 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 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 vfs_write+0x150/0x4d0 fs/read_write.c:549 ksys_write+0x103/0x260 fs/read_write.c:599 __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 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 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:00007fbcb973b188 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: 00007ffef9598b6f R14: 00007fbcb973b300 R15: 0000000000022000 Bluetooth: hci0: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready ieee80211 phy14: 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 phy15: Selected rate control algorithm 'minstrel_ht' IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready 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_CHANGE): wlan1: link becomes ready