BUG: sleeping function called from invalid context at kernel/locking/mutex.c:585 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 6422, name: kworker/u9:2 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 4 locks held by kworker/u9:2/6422: #0: ffff0000d8e0f148 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work+0x628/0x1600 kernel/workqueue.c:3203 #1: ffff8000b1037c20 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x6bc/0x1600 kernel/workqueue.c:3203 #2: ffff0000e2f6c078 (&hdev->lock){+.+.}-{3:3}, at: hci_le_create_big_complete_evt+0xc0/0x998 net/bluetooth/hci_event.c:6850 #3: ffff80008f9ffee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:336 CPU: 1 UID: 0 PID: 6422 Comm: kworker/u9:2 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci2 hci_rx_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 __might_resched+0x374/0x4d0 kernel/sched/core.c:8656 __might_sleep+0x90/0xe4 kernel/sched/core.c:8585 __mutex_lock_common+0xcc/0x21a0 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 hci_connect_cfm include/net/bluetooth/hci_core.h:1957 [inline] hci_le_create_big_complete_evt+0x348/0x998 net/bluetooth/hci_event.c:6875 hci_le_meta_evt+0x2a4/0x478 net/bluetooth/hci_event.c:7132 hci_event_func net/bluetooth/hci_event.c:7440 [inline] hci_event_packet+0x890/0x106c net/bluetooth/hci_event.c:7495 hci_rx_work+0x318/0xa80 net/bluetooth/hci_core.c:4029 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 ============================= [ BUG: Invalid wait context ] 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Tainted: G W ----------------------------- kworker/u9:2/6422 is trying to lock: ffff800092895ec8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1957 [inline] ffff800092895ec8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_le_create_big_complete_evt+0x348/0x998 net/bluetooth/hci_event.c:6875 other info that might help us debug this: context-{4:4} 4 locks held by kworker/u9:2/6422: #0: ffff0000d8e0f148 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work+0x628/0x1600 kernel/workqueue.c:3203 #1: ffff8000b1037c20 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x6bc/0x1600 kernel/workqueue.c:3203 #2: ffff0000e2f6c078 (&hdev->lock){+.+.}-{3:3}, at: hci_le_create_big_complete_evt+0xc0/0x998 net/bluetooth/hci_event.c:6850 #3: ffff80008f9ffee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:336 stack backtrace: CPU: 1 UID: 0 PID: 6422 Comm: kworker/u9:2 Tainted: G W 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci2 hci_rx_work Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_lock_invalid_wait_context kernel/locking/lockdep.c:4802 [inline] check_wait_context kernel/locking/lockdep.c:4874 [inline] __lock_acquire+0x1f40/0x77c8 kernel/locking/lockdep.c:5152 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5825 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 hci_connect_cfm include/net/bluetooth/hci_core.h:1957 [inline] hci_le_create_big_complete_evt+0x348/0x998 net/bluetooth/hci_event.c:6875 hci_le_meta_evt+0x2a4/0x478 net/bluetooth/hci_event.c:7132 hci_event_func net/bluetooth/hci_event.c:7440 [inline] hci_event_packet+0x890/0x106c net/bluetooth/hci_event.c:7495 hci_rx_work+0x318/0xa80 net/bluetooth/hci_core.c:4029 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 ------------[ cut here ]------------ Voluntary context switch within RCU read-side critical section! WARNING: CPU: 1 PID: 6422 at kernel/rcu/tree_plugin.h:331 rcu_note_context_switch+0xb84/0x101c kernel/rcu/tree_plugin.h:331 Modules linked in: CPU: 1 UID: 0 PID: 6422 Comm: kworker/u9:2 Tainted: G W 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: hci2 hci_rx_work pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : rcu_note_context_switch+0xb84/0x101c kernel/rcu/tree_plugin.h:331 lr : rcu_note_context_switch+0xb84/0x101c kernel/rcu/tree_plugin.h:331 sp : ffff8000b1037210 x29: ffff8000b10372a0 x28: dfff800000000000 x27: 1ffff00011f040ba x26: 0000000000000000 x25: ffff80008f784900 x24: 0000000000000000 x23: dfff800000000000 x22: ffff800123ee9000 x21: ffff0000d8f9bc80 x20: ffff0000d8f9c084 x19: ffff0000d8f9bc80 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008b3ede1c x15: ffff700011f13534 x14: 1ffff00011f13534 x13: 0000000000000004 x12: ffffffffffffffff x11: 0000000000100000 x10: 00000000000a55ae x9 : 71c806ba0ef6c300 x8 : 71c806ba0ef6c300 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000b1036938 x4 : ffff80008f90d220 x3 : ffff8000803921b4 x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: rcu_note_context_switch+0xb84/0x101c kernel/rcu/tree_plugin.h:331 (P) rcu_note_context_switch+0xb84/0x101c kernel/rcu/tree_plugin.h:331 (L) __schedule+0x2c8/0x27d0 kernel/sched/core.c:6573 __schedule_loop kernel/sched/core.c:6770 [inline] schedule+0xbc/0x238 kernel/sched/core.c:6785 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6842 mutex_optimistic_spin+0x2e0/0x49c kernel/locking/mutex.c:510 __mutex_lock_common+0x1bc/0x21a0 kernel/locking/mutex.c:612 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 hci_connect_cfm include/net/bluetooth/hci_core.h:1957 [inline] hci_le_create_big_complete_evt+0x348/0x998 net/bluetooth/hci_event.c:6875 hci_le_meta_evt+0x2a4/0x478 net/bluetooth/hci_event.c:7132 hci_event_func net/bluetooth/hci_event.c:7440 [inline] hci_event_packet+0x890/0x106c net/bluetooth/hci_event.c:7495 hci_rx_work+0x318/0xa80 net/bluetooth/hci_core.c:4029 process_one_work+0x7bc/0x1600 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x97c/0xeec kernel/workqueue.c:3391 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 irq event stamp: 4207 hardirqs last enabled at (4207): [] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:85 [inline] hardirqs last enabled at (4207): [] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:95 hardirqs last disabled at (4206): [] preempt_schedule_irq+0x90/0x188 kernel/sched/core.c:7016 softirqs last enabled at (4202): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (4202): [] handle_softirqs+0xa38/0xbf8 kernel/softirq.c:582 softirqs last disabled at (4093): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]---