Skip to content

Commit 0b5cd6c

Browse files
isilenceaxboe
authored andcommitted
io_uring: fix skipping disabling sqo on exec
If there are no requests at the time __io_uring_task_cancel() is called, tctx_inflight() returns zero and and it terminates not getting a chance to go through __io_uring_files_cancel() and do io_disable_sqo_submit(). And we absolutely want them disabled by the time cancellation ends. Reported-by: Jens Axboe <[email protected]> Signed-off-by: Pavel Begunkov <[email protected]> Fixes: d9d0521 ("io_uring: stop SQPOLL submit on creator's death") Signed-off-by: Jens Axboe <[email protected]>
1 parent 4325cb4 commit 0b5cd6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/io_uring.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9085,6 +9085,10 @@ void __io_uring_task_cancel(void)
90859085
/* make sure overflow events are dropped */
90869086
atomic_inc(&tctx->in_idle);
90879087

9088+
/* trigger io_disable_sqo_submit() */
9089+
if (tctx->sqpoll)
9090+
__io_uring_files_cancel(NULL);
9091+
90889092
do {
90899093
/* read completions before cancelations */
90909094
inflight = tctx_inflight(tctx);

0 commit comments

Comments
 (0)