mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
io_uring: fix skipping disabling sqo on exec
[ Upstream commit0b5cd6c32b] 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. Cc: stable@vger.kernel.org # 5.5+ Reported-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Fixes:d9d05217cb("io_uring: stop SQPOLL submit on creator's death") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
54b4c4f9ab
commit
186725a80c
|
|
@ -8917,6 +8917,10 @@ void __io_uring_task_cancel(void)
|
|||
/* make sure overflow events are dropped */
|
||||
atomic_inc(&tctx->in_idle);
|
||||
|
||||
/* trigger io_disable_sqo_submit() */
|
||||
if (tctx->sqpoll)
|
||||
__io_uring_files_cancel(NULL);
|
||||
|
||||
do {
|
||||
/* read completions before cancelations */
|
||||
inflight = tctx_inflight(tctx);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user