Bluetooth: hci5: link tx timeout
Bluetooth: hci5: killing stalled connection 11:aa:aa:aa:aa:aa
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 300, name: kworker/u7:6
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
3 locks held by kworker/u7:6/300:
#0: ffff88800e15c538 ((wq_completion)hci5#2){+.+.}-{0:0}, at: process_one_work+0x69e/0x1450
#1: ffff8880155dfd98 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x6d1/0x1450
#2: ffffffff8560e8e0 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x171/0x480
CPU: 0 PID: 300 Comm: kworker/u7:6 Not tainted 6.5.0-rc6-next-20230818 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Workqueue: hci5 hci_tx_work
Call Trace:
dump_stack_lvl+0xc1/0xf0
__might_resched+0x2f9/0x510
__mutex_lock+0x9e/0x1a30
hci_cmd_sync_submit+0x3b/0x2d0
hci_cmd_sync_queue+0x7b/0xb0
hci_disconnect+0x1c2/0x450
__check_timeout+0x2cc/0x480
hci_tx_work+0x7cb/0x1a70
process_one_work+0x7c8/0x1450
worker_thread+0x80e/0x1190
kthread+0x33f/0x440
ret_from_fork+0x48/0x80
ret_from_fork_asm+0x1b/0x30
=============================
[ BUG: Invalid wait context ]
6.5.0-rc6-next-20230818 #1 Tainted: G W
-----------------------------
kworker/u7:6/300 is trying to lock:
ffff8880316d89b0 (&hdev->unregister_lock){+.+.}-{3:3}, at: hci_cmd_sync_submit+0x3b/0x2d0
other info that might help us debug this:
context-{4:4}
3 locks held by kworker/u7:6/300:
#0: ffff88800e15c538 ((wq_completion)hci5#2){+.+.}-{0:0}, at: process_one_work+0x69e/0x1450
#1: ffff8880155dfd98 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: process_one_work+0x6d1/0x1450
#2: ffffffff8560e8e0 (rcu_read_lock){....}-{1:2}, at: __check_timeout+0x171/0x480
stack backtrace:
CPU: 0 PID: 300 Comm: kworker/u7:6 Tainted: G W 6.5.0-rc6-next-20230818 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Workqueue: hci5 hci_tx_work
Call Trace:
dump_stack_lvl+0x91/0xf0
__lock_acquire+0x1605/0x6340
lock_acquire+0x19a/0x4c0
__mutex_lock+0x12a/0x1a30
hci_cmd_sync_submit+0x3b/0x2d0
hci_cmd_sync_queue+0x7b/0xb0
hci_disconnect+0x1c2/0x450
__check_timeout+0x2cc/0x480
hci_tx_work+0x7cb/0x1a70
process_one_work+0x7c8/0x1450
worker_thread+0x80e/0x1190
kthread+0x33f/0x440
ret_from_fork+0x48/0x80
ret_from_fork_asm+0x1b/0x30
syz-executor.7[11724]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop7: detected capacity change from 0 to 40
FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
CPU: 1 PID: 11720 Comm: syz-executor.5 Tainted: G W 6.5.0-rc6-next-20230818 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0xc1/0xf0
should_fail_ex+0x4b4/0x5b0
_copy_from_user+0x30/0xf0
do_handle_open+0x16d/0x5b0
do_syscall_64+0x3f/0x90
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
RIP: 0033:0x7f72c27a2b19
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:00007f72bfd18188 EFLAGS: 00000246 ORIG_RAX: 0000000000000130
RAX: ffffffffffffffda RBX: 00007f72c28b5f60 RCX: 00007f72c27a2b19
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003
RBP: 00007f72bfd181d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc7e69c71f R14: 00007f72bfd18300 R15: 0000000000022000
FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
CPU: 0 PID: 11739 Comm: syz-executor.5 Tainted: G W 6.5.0-rc6-next-20230818 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0xc1/0xf0
should_fail_ex+0x4b4/0x5b0
_copy_to_user+0x30/0xc0
simple_read_from_buffer+0xd0/0x170
proc_fail_nth_read+0x1a6/0x290
vfs_read+0x1de/0x8f0
ksys_read+0x122/0x250
do_syscall_64+0x3f/0x90
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
RIP: 0033:0x7f72c275569c
Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 fc ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 2f fd ff ff 48
RSP: 002b:00007f72bfd18170 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 00007f72c275569c
RDX: 000000000000000f RSI: 00007f72bfd181e0 RDI: 0000000000000004
RBP: 00007f72bfd181d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc7e69c71f R14: 00007f72bfd18300 R15: 0000000000022000
syz-executor.7: attempt to access beyond end of device
loop7: rw=2049, sector=40, nr_sectors = 4 limit=40
Buffer I/O error on dev loop7, logical block 10, lost async page write
syz-executor.7[11724]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
Bluetooth: hci5: link tx timeout
Bluetooth: hci5: killing stalled connection 11:aa:aa:aa:aa:aa
syz-executor.7[11756]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
loop7: detected capacity change from 0 to 40
syz-executor.7: attempt to access beyond end of device
loop7: rw=2049, sector=40, nr_sectors = 4 limit=40
Buffer I/O error on dev loop7, logical block 10, lost async page write
Bluetooth: hci5: command 0x0406 tx timeout