ci starts bisection 2022-12-28 16:49:29.743723897 +0000 UTC m=+86920.286429462 bisecting fixing commit since d888c83fcec75194a8a48ccd283953bdba7b2550 building syzkaller on 42718dd659525414aa0bf2794688ac94a32f7764 ensuring issue is reproducible on original commit d888c83fcec75194a8a48ccd283953bdba7b2550 testing commit d888c83fcec75194a8a48ccd283953bdba7b2550 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 2444ff20a33595c60ff42bc388315b19c9dad5a621aff0d2df2a2c0f1ee92680 run #0: OK run #1: crashed: INFO: task hung in lock_sock_nested run #2: crashed: INFO: task hung in lock_sock_nested run #3: crashed: INFO: task hung in lock_sock_nested run #4: crashed: INFO: task hung in lock_sock_nested run #5: crashed: INFO: task hung in lock_sock_nested run #6: crashed: INFO: task hung in lock_sock_nested run #7: crashed: INFO: task hung in lock_sock_nested run #8: crashed: INFO: task hung in lock_sock_nested run #9: crashed: INFO: task hung in lock_sock_nested run #10: crashed: INFO: task hung in lock_sock_nested run #11: crashed: INFO: task hung in lock_sock_nested run #12: crashed: INFO: task hung in lock_sock_nested run #13: crashed: INFO: task hung in lock_sock_nested run #14: crashed: INFO: task hung in lock_sock_nested run #15: crashed: INFO: task hung in lock_sock_nested run #16: crashed: INFO: task hung in lock_sock_nested run #17: crashed: INFO: task hung in lock_sock_nested run #18: crashed: INFO: task hung in lock_sock_nested run #19: crashed: INFO: task hung in lock_sock_nested testing current HEAD 1b929c02afd37871d5afb9d498426f83432e71c2 testing commit 1b929c02afd37871d5afb9d498426f83432e71c2 gcc compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a986323b0f04ad0bb933cfd1fb0fab1e1ba6e80dca6ef05f7418bc2f0b4c7fc4 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: exit status NUM 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: 27m25.334913466s (build: 17m9.911359136s, test: 9m18.252754727s) the crash still happens on HEAD commit msg: Linux 6.2-rc1 crash: possible deadlock in rfcomm_sk_state_change ====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc1-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/5500 is trying to acquire lock: ffff88807eb9f130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1725 [inline] ffff88807eb9f130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 but task is already holding lock: ffff888145f13128 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&d->lock){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x116e/0x1300 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x5d0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (rfcomm_mutex){+.+.}-{3:3}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 rfcomm_dlc_open+0x20/0x50 net/bluetooth/rfcomm/core.c:425 rfcomm_sock_connect+0x222/0x3f0 net/bluetooth/rfcomm/sock.c:413 __sys_connect_file net/socket.c:1976 [inline] __sys_connect+0x234/0x260 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x71/0x80 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 lock_sock_nested+0x3a/0xd0 net/core/sock.c:3470 lock_sock include/net/sock.h:1725 [inline] rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 __rfcomm_dlc_close+0x230/0x3e0 net/bluetooth/rfcomm/core.c:489 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x116e/0x1300 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x5d0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM --> rfcomm_mutex --> &d->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&d->lock); lock(rfcomm_mutex); lock(&d->lock); lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM); *** DEADLOCK *** 3 locks held by syz-executor.0/5500: #0: ffff888072008e10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline] #0: ffff888072008e10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release net/socket.c:649 [inline] #0: ffff888072008e10 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: sock_close+0x88/0x230 net/socket.c:1365 #1: ffffffff8ce21da8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x2d/0x180 net/bluetooth/rfcomm/core.c:507 #2: ffff888145f13128 (&d->lock){+.+.}-{3:3}, at: __rfcomm_dlc_close+0x1ed/0x3e0 net/bluetooth/rfcomm/core.c:487 stack backtrace: CPU: 1 PID: 5500 Comm: syz-executor.0 Not tainted 6.2.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x163/0x220 lib/dump_stack.c:106 check_noncircular+0x2f9/0x3b0 kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 lock_sock_nested+0x3a/0xd0 net/core/sock.c:3470 lock_sock include/net/sock.h:1725 [inline] rfcomm_sk_state_change+0x51/0x280 net/bluetooth/rfcomm/sock.c:73 __rfcomm_dlc_close+0x230/0x3e0 net/bluetooth/rfcomm/core.c:489 rfcomm_dlc_close+0xf0/0x180 net/bluetooth/rfcomm/core.c:520 __rfcomm_sock_close+0xf5/0x1d0 net/bluetooth/rfcomm/sock.c:220 rfcomm_sock_shutdown+0x98/0x1c0 net/bluetooth/rfcomm/sock.c:907 rfcomm_sock_release+0x4b/0x100 net/bluetooth/rfcomm/sock.c:928 __sock_release net/socket.c:650 [inline] sock_close+0xcc/0x230 net/socket.c:1365 __fput+0x339/0x710 fs/file_table.c:320 task_work_run+0x227/0x2b0 kernel/task_work.c:179 get_signal+0x116e/0x1300 kernel/signal.c:2635 arch_do_signal_or_restart+0x8d/0x5d0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7eff33689049 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:00007eff34863168 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 00007eff3379bf60 RCX: 00007eff33689049 RDX: 000000000000005a RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007eff336e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd1b4517bf R14: 00007eff34863300 R15: 0000000000022000