Commit b7f5a0b
io_uring: fix sqpoll cancellation via task_work
Running sqpoll cancellations via task_work_run() is a bad idea because
it depends on other task works to be run, but those may be locked in
currently running task_work_run() because of how it's (splicing the list
in batches).
Enqueue and run them through a separate callback head, namely
struct io_sq_data::park_task_work. As a nice bonus we now precisely
control where it's run, that's much safer than guessing where it can
happen as it was before.
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 9b46571 commit b7f5a0b
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| |||
6727 | 6728 | | |
6728 | 6729 | | |
6729 | 6730 | | |
| 6731 | + | |
6730 | 6732 | | |
6731 | 6733 | | |
6732 | 6734 | | |
| |||
6781 | 6783 | | |
6782 | 6784 | | |
6783 | 6785 | | |
| 6786 | + | |
6784 | 6787 | | |
6785 | 6788 | | |
6786 | 6789 | | |
| |||
6792 | 6795 | | |
6793 | 6796 | | |
6794 | 6797 | | |
| 6798 | + | |
6795 | 6799 | | |
6796 | 6800 | | |
6797 | 6801 | | |
| |||
8890 | 8894 | | |
8891 | 8895 | | |
8892 | 8896 | | |
8893 | | - | |
| 8897 | + | |
8894 | 8898 | | |
8895 | 8899 | | |
8896 | 8900 | | |
| |||
0 commit comments