On 02/01/2021 16:06, Pavel Begunkov wrote: > CPU0 CPU1 > ---- ---- > lock(&new->fa_lock); > local_irq_disable(); > lock(&ctx->completion_lock); > lock(&new->fa_lock); > <Interrupt> > lock(&ctx->completion_lock); > > *** DEADLOCK *** > > Move kill_fasync() out of io_commit_cqring() to io_cqring_ev_posted(), > so it doesn't hold completion_lock while doing it. That saves from the > reported deadlock, and it's just nice to shorten the locking time and > untangle nested locks (compl_lock -> wq_head::lock). Need to resend this one -- Pavel Begunkov