Re: [syzbot] [bluetooth?] INFO: task hung in hci_conn_failed

From: Tetsuo Handa
Date: Mon Jan 29 2024 - 00:54:21 EST


On 2024/01/29 13:48, Hillf Danton wrote:
>> 3 locks held by kworker/1:2/779:
>> #0: ffff8880b993ccd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:559
>> #1: ffffc900038c7d80 ((work_completion)(&aux->work)#2){+.+.}-{0:0}, at: process_one_work+0x7eb/0x15d0 kernel/workqueue.c:2609
>> #2: ffff888052984c80 (&aux->poke_mutex){+.+.}-{3:3}, at: __fd_array_map_delete_elem+0x125/0x2f0 kernel/bpf/arraymap.c:884
>
> Could locking people shed any light on the failure of detecting the
> poke_mutex with rq lock held?
>

Showing held locks (lockdep_print_held_locks()) is not a snapshot.
Synchronous printk() can make #0 already released by the moment #2 is taken.

Please consult printk() people for possibility of making printk() from
lockdep reports (and/or hung task reports) asynchronous.