]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: always go for cancellation spin on exec
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 27 Mar 2021 09:59:30 +0000 (09:59 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 29 Mar 2021 00:11:53 +0000 (18:11 -0600)
commitf3bb483a16da6647072240c5bed429b930da73b9
treeb2f148f6469d1319bc5e81abe09e6d358a254cd4
parent3c64ab18e982c1c0c38d78f0b0cf614acc630d38
io_uring: always go for cancellation spin on exec

Always try to do cancellation in __io_uring_task_cancel() at least once,
so it actually goes and cleans its sqpoll tasks (i.e. via
io_sqpoll_cancel_sync()), otherwise sqpoll task may submit new requests
after cancellation and it's racy for many reasons.

Fixes: b0acc79e47e03 ("io_uring: cancel sqpoll via task_work")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0a21bd6d794bb1629bc906dd57a57b2c2985a8ac.1616839147.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c