bisecting fixing commit since 29ce8f9701072fc221d9c38ad952de1a9578f95c building syzkaller on 7eb7e15259fddd67759f90feb2b016da878f76c7 testing commit 29ce8f9701072fc221d9c38ad952de1a9578f95c compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a43f9fd0c03116b5a7fbbe98af2dbf1003bf57525103af08f68122df7c7566cb all runs: crashed: INFO: task hung in lock_sock_nested testing current HEAD 9b5bcb193a3bba4b96ead86df52602e3951655ba testing commit 9b5bcb193a3bba4b96ead86df52602e3951655ba compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 1b2675ce151b40569e4cde03bcb873fdee74128bc0267dce52130670a4d77c6d run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: failed to write control pipe: write |NUM: broken pipe run #1: crashed: possible deadlock in rfcomm_sk_state_change run #2: crashed: possible deadlock in rfcomm_sk_state_change run #3: crashed: possible deadlock in rfcomm_sk_state_change run #4: crashed: possible deadlock in rfcomm_sk_state_change run #5: crashed: possible deadlock in rfcomm_sk_state_change run #6: crashed: possible deadlock in rfcomm_sk_state_change run #7: crashed: possible deadlock in rfcomm_sk_state_change run #8: crashed: possible deadlock in rfcomm_sk_state_change run #9: crashed: possible deadlock in rfcomm_sk_state_change revisions tested: 2, total time: 22m5.972551463s (build: 12m50.196568642s, test: 8m44.541838569s) the crash still happens on HEAD commit msg: Merge branch 'dsa-tagger-storage' crash: possible deadlock in rfcomm_sk_state_change ============================================ WARNING: possible recursive locking detected 5.16.0-rc4-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/4086 is trying to acquire lock: ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1667 [inline] ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sk_state_change+0x99/0x320 net/bluetooth/rfcomm/sock.c:73 but task is already holding lock: ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1667 [inline] ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_shutdown+0x41/0x1b0 net/bluetooth/rfcomm/sock.c:902 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM); lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor.4/4086: #0: ffff88806258d010 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:783 [inline] #0: ffff88806258d010 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release+0x76/0x270 net/socket.c:648 #1: ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1667 [inline] #1: ffff88801c9b3130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_shutdown+0x41/0x1b0 net/bluetooth/rfcomm/sock.c:902 #2: ffffffff8c46ace8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x25/0x200 net/bluetooth/rfcomm/core.c:507 #3: ffff88806151b128 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0xff/0x770 net/bluetooth/rfcomm/core.c:487 stack backtrace: CPU: 0 PID: 4086 Comm: syz-executor.4 Not tainted 5.16.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2956 [inline] check_deadlock kernel/locking/lockdep.c:2999 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire.cold+0x229/0x3ab kernel/locking/lockdep.c:5027 lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 lock_sock_nested+0x2b/0xd0 net/core/sock.c:3291 lock_sock include/net/sock.h:1667 [inline] rfcomm_sk_state_change+0x99/0x320 net/bluetooth/rfcomm/sock.c:73 __rfcomm_dlc_close+0x153/0x770 net/bluetooth/rfcomm/core.c:489 rfcomm_dlc_close+0x1a4/0x200 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0x80/0x1f0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0xb9/0x1b0 net/bluetooth/rfcomm/sock.c:905 rfcomm_sock_release+0x4a/0x120 net/bluetooth/rfcomm/sock.c:925 __sock_release+0xbb/0x270 net/socket.c:649 sock_close+0xf/0x20 net/socket.c:1314 __fput+0x204/0x8d0 fs/file_table.c:280 task_work_run+0xc0/0x160 kernel/task_work.c:164 get_signal+0x158d/0x1ce0 kernel/signal.c:2624 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665f9 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:00007f3e97cbc188 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 000000000056bf80 RCX: 00000000004665f9 RDX: 0000000000000080 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffcf2177fcf R14: 00007f3e97cbc300 R15: 0000000000022000