Commit c7d9561
io_uring: fix early sqd_list removal sqpoll hangs
[ 245.463317] INFO: task iou-sqp-1374:1377 blocked for more than 122 seconds.
[ 245.463334] task:iou-sqp-1374 state:D flags:0x00004000
[ 245.463345] Call Trace:
[ 245.463352] __schedule+0x36b/0x950
[ 245.463376] schedule+0x68/0xe0
[ 245.463385] __io_uring_cancel+0xfb/0x1a0
[ 245.463407] do_exit+0xc0/0xb40
[ 245.463423] io_sq_thread+0x49b/0x710
[ 245.463445] ret_from_fork+0x22/0x30
It happens when sqpoll forgot to run park_task_work and goes to exit,
then exiting user may remove ctx from sqd_list, and so corresponding
io_sq_thread() -> io_uring_cancel_sqpoll() won't be executed. Hopefully
it just stucks in do_exit() in this case.
Fixes: dbe1bdb ("io_uring: handle signals for IO threads like a normal thread")
Reported-by: Joakim Hassila <joj@mac.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent c60eb04 commit c7d9561
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6754 | 6754 | | |
6755 | 6755 | | |
6756 | 6756 | | |
| 6757 | + | |
| 6758 | + | |
| 6759 | + | |
6757 | 6760 | | |
6758 | 6761 | | |
6759 | 6762 | | |
| |||
6770 | 6773 | | |
6771 | 6774 | | |
6772 | 6775 | | |
6773 | | - | |
6774 | | - | |
6775 | 6776 | | |
6776 | 6777 | | |
| 6778 | + | |
| 6779 | + | |
6777 | 6780 | | |
6778 | 6781 | | |
6779 | 6782 | | |
| |||
0 commit comments