io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>, io-uring@vger.kernel.org
Cc: syzbot+91ca3f25bd7f795f019c@syzkaller.appspotmail.com
Subject: Re: [PATCH 1/4] io_uring: dont kill fasync under completion_lock
Date: Sun, 3 Jan 2021 11:58:03 +0000	[thread overview]
Message-ID: <ad12bf45-d63c-d636-108c-5656b9a61def@gmail.com> (raw)
In-Reply-To: <e51028690f7415a018403d3607739693188b5f7b.1609600704.git.asml.silence@gmail.com>

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

  reply	other threads:[~2021-01-03 12:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-02 16:06 [PATCH 0/4] bunch of random fixes Pavel Begunkov
2021-01-02 16:06 ` [PATCH 1/4] io_uring: dont kill fasync under completion_lock Pavel Begunkov
2021-01-03 11:58   ` Pavel Begunkov [this message]
2021-01-02 16:06 ` [PATCH 2/4] io_uring: patch up IOPOLL overflow_flush sync Pavel Begunkov
2021-01-03 15:12   ` Jens Axboe
2021-01-03 16:29     ` Pavel Begunkov
2021-01-03 22:05       ` Jens Axboe
2021-01-02 16:06 ` [PATCH 3/4] io_uring: drop file refs after task cancel Pavel Begunkov
2021-01-02 16:06 ` [PATCH 4/4] io_uring: cancel more aggressively in exit_work Pavel Begunkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad12bf45-d63c-d636-108c-5656b9a61def@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=syzbot+91ca3f25bd7f795f019c@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).