diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-01-07 03:15:42 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-07 07:48:09 -0700 |
commit | 4aa84f2ffa81f71e15e5cffc2cc6090dbee78f8e (patch) | |
tree | 4c907bc09f6231c0a4ea89092800bad04347272f /drivers/pci/controller/pci-host-common.c | |
parent | 80c18e4ac20c9cde420cb3ffab48c936147cf07d (diff) |
io_uring: dont kill fasync under completion_lock
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).
Reported-by: syzbot+91ca3f25bd7f795f019c@syzkaller.appspotmail.com
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions