Commit 43597aa
io_uring: fix ctx-exit io_rsrc_put_work() deadlock
__io_rsrc_put_work() might need ->uring_lock, so nobody should wait for
rsrc nodes holding the mutex. However, that's exactly what
io_ring_ctx_free() does with io_wait_rsrc_data().
Split it into rsrc wait + dealloc, and move the first one out of the
lock.
Cc: stable@vger.kernel.org
Fixes: b60c8dc ("io_uring: preparation for rsrc tagging")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0130c5c2693468173ec1afab714e0885d2c9c363.1628559783.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent c018db4 commit 43597aa
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8652 | 8652 | | |
8653 | 8653 | | |
8654 | 8654 | | |
8655 | | - | |
| 8655 | + | |
8656 | 8656 | | |
8657 | | - | |
8658 | | - | |
8659 | | - | |
| 8657 | + | |
8660 | 8658 | | |
8661 | | - | |
8662 | 8659 | | |
8663 | 8660 | | |
8664 | 8661 | | |
| |||
8670 | 8667 | | |
8671 | 8668 | | |
8672 | 8669 | | |
| 8670 | + | |
| 8671 | + | |
| 8672 | + | |
| 8673 | + | |
8673 | 8674 | | |
8674 | | - | |
| 8675 | + | |
8675 | 8676 | | |
8676 | | - | |
| 8677 | + | |
8677 | 8678 | | |
8678 | 8679 | | |
8679 | 8680 | | |
| |||
0 commit comments