====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ krfcommd/3215 is trying to acquire lock: ffff88804711f948 ((wq_completion)hci3){+.+.}-{0:0}, at: touch_wq_lockdep_map+0xb5/0x180 kernel/workqueue.c:4280 but task is already holding lock: ffffffff91a3c020 (rfcomm_mutex){+.+.}-{4:4}, at: rfcomm_process_sessions+0x2c6/0x9690 net/bluetooth/rfcomm/core.c:2150 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (rfcomm_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 rfcomm_dlc_open+0xc1/0xbd0 net/bluetooth/rfcomm/core.c:422 rfcomm_dev_activate+0x72/0xe0 net/bluetooth/rfcomm/tty.c:112 tty_port_open+0x1df/0x2d0 drivers/tty/tty_port.c:798 rfcomm_tty_open+0xbb/0x520 net/bluetooth/rfcomm/tty.c:744 tty_open+0x48a/0xd80 drivers/tty/tty_io.c:2112 chrdev_open+0x4d9/0x600 fs/char_dev.c:413 do_dentry_open+0x80e/0x1360 fs/open.c:1004 vfs_open_consume+0x4a/0x350 fs/open.c:1135 do_open fs/namei.c:4961 [inline] path_openat+0x1755/0x20e0 fs/namei.c:5126 do_file_open+0x23e/0x4a0 fs/namei.c:5155 do_sys_openat2+0x115/0x200 fs/open.c:1496 do_sys_open fs/open.c:1502 [inline] __do_sys_openat fs/open.c:1842 [inline] __se_sys_openat fs/open.c:1837 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1837 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #5 (&port->mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 class_mutex_constructor include/linux/mutex.h:253 [inline] uart_set_termios+0x83/0x1330 drivers/tty/serial/serial_core.c:1672 tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341 set_termios+0x538/0x6c0 drivers/tty/tty_ioctl.c:516 tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1 tty_ioctl+0x9bd/0xde0 drivers/tty/tty_io.c:2791 vfs_ioctl fs/ioctl.c:52 [inline] __do_sys_ioctl fs/ioctl.c:604 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:590 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #4 (&tty->termios_rwsem){++++}-{4:4}: down_read+0x45/0x320 kernel/locking/rwsem.c:1574 class_rwsem_read_constructor include/linux/rwsem.h:259 [inline] n_tty_receive_buf_common+0x84/0x13d0 drivers/tty/n_tty.c:1678 tty_port_default_receive_buf+0x6e/0xa0 drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:452 [inline] flush_to_ldisc+0x247/0x6c0 drivers/tty/tty_buffer.c:502 process_one_work kernel/workqueue.c:3503 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3586 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3667 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (&buf->lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236 hci_uart_flush+0xd7/0x3c0 drivers/bluetooth/hci_ldisc.c:255 hci_uart_close+0x1d/0xa0 drivers/bluetooth/hci_ldisc.c:292 hci_dev_drop_last_cmd_req_and_close+0x152/0x180 net/bluetooth/hci_sync.c:6053 hci_dev_open_sync+0x1fac/0x2e10 net/bluetooth/hci_sync.c:6147 hci_dev_do_open net/bluetooth/hci_core.c:431 [inline] hci_power_on+0x1c4/0x760 net/bluetooth/hci_core.c:1020 process_one_work kernel/workqueue.c:3503 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3586 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3667 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 (&hdev->req_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821 hci_dev_do_open net/bluetooth/hci_core.c:429 [inline] hci_power_on+0x1bc/0x760 net/bluetooth/hci_core.c:1020 process_one_work kernel/workqueue.c:3503 [inline] process_scheduled_works+0xc5d/0x1650 kernel/workqueue.c:3586 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3667 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #1 ((work_completion)(&hdev->power_on)){+.+.}-{0:0}: process_one_work kernel/workqueue.c:3479 [inline] process_scheduled_works+0xc23/0x1650 kernel/workqueue.c:3586 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3667 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #0 ((wq_completion)hci3){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 touch_wq_lockdep_map+0xcb/0x180 kernel/workqueue.c:4280 __flush_workqueue+0x148/0x10b0 kernel/workqueue.c:4322 drain_workqueue+0xdc/0x280 kernel/workqueue.c:4513 destroy_workqueue+0xbe/0x7b0 kernel/workqueue.c:6427 hci_release_dev+0x113/0x1540 net/bluetooth/hci_core.c:2913 bt_host_release+0x93/0xa0 net/bluetooth/hci_sysfs.c:100 device_release+0xc4/0x1f0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x222/0x550 lib/kobject.c:737 device_release+0xc4/0x1f0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x222/0x550 lib/kobject.c:737 hci_conn_put include/net/bluetooth/hci_core.h:1761 [inline] l2cap_conn_free net/bluetooth/l2cap_core.c:2014 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_conn_put net/bluetooth/l2cap_core.c:2027 [inline] l2cap_chan_destroy net/bluetooth/l2cap_core.c:510 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_chan_put+0x1fd/0x350 net/bluetooth/l2cap_core.c:537 l2cap_sock_release+0x1a2/0x230 net/bluetooth/l2cap_sock.c:1566 __sock_release net/socket.c:735 [inline] sock_release+0x85/0x150 net/socket.c:763 rfcomm_session_del+0x14b/0x270 net/bluetooth/rfcomm/core.c:782 rfcomm_process_sessions+0x7456/0x9690 net/bluetooth/rfcomm/core.c:-1 rfcomm_run+0x3f5/0x620 net/bluetooth/rfcomm/core.c:2259 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Chain exists of: (wq_completion)hci3 --> &port->mutex --> rfcomm_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rfcomm_mutex); lock(&port->mutex); lock(rfcomm_mutex); lock((wq_completion)hci3); *** DEADLOCK *** locks held by krfcommd/3215: 1, on CPU#0: #0: ffffffff91a3c020 (rfcomm_mutex){+.+.}-{4:4}, at: rfcomm_process_sessions+0x2c6/0x9690 net/bluetooth/rfcomm/core.c:2150 stack backtrace: CPU: 0 UID: 0 PID: 3215 Comm: krfcommd Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219 check_prev_add kernel/locking/lockdep.c:3209 [inline] check_prevs_add kernel/locking/lockdep.c:3328 [inline] validate_chain kernel/locking/lockdep.c:3952 [inline] __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 touch_wq_lockdep_map+0xcb/0x180 kernel/workqueue.c:4280 __flush_workqueue+0x148/0x10b0 kernel/workqueue.c:4322 drain_workqueue+0xdc/0x280 kernel/workqueue.c:4513 destroy_workqueue+0xbe/0x7b0 kernel/workqueue.c:6427 hci_release_dev+0x113/0x1540 net/bluetooth/hci_core.c:2913 bt_host_release+0x93/0xa0 net/bluetooth/hci_sysfs.c:100 device_release+0xc4/0x1f0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x222/0x550 lib/kobject.c:737 device_release+0xc4/0x1f0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x222/0x550 lib/kobject.c:737 hci_conn_put include/net/bluetooth/hci_core.h:1761 [inline] l2cap_conn_free net/bluetooth/l2cap_core.c:2014 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_conn_put net/bluetooth/l2cap_core.c:2027 [inline] l2cap_chan_destroy net/bluetooth/l2cap_core.c:510 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_chan_put+0x1fd/0x350 net/bluetooth/l2cap_core.c:537 l2cap_sock_release+0x1a2/0x230 net/bluetooth/l2cap_sock.c:1566 __sock_release net/socket.c:735 [inline] sock_release+0x85/0x150 net/socket.c:763 rfcomm_session_del+0x14b/0x270 net/bluetooth/rfcomm/core.c:782 rfcomm_process_sessions+0x7456/0x9690 net/bluetooth/rfcomm/core.c:-1 rfcomm_run+0x3f5/0x620 net/bluetooth/rfcomm/core.c:2259 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245