]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: always wait for sqd exited when stopping SQPOLL thread
authorJens Axboe <axboe@kernel.dk>
Tue, 9 Mar 2021 23:32:13 +0000 (16:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Mar 2021 14:28:43 +0000 (07:28 -0700)
commit9a8421c6e5b05e35d9d6196eddd184ca6b5a2d4a
treea545de836d886a769bd0c68c3df1248e1c15135c
parent58117275b1930bad5c6287704d5c37780a0d103b
io_uring: always wait for sqd exited when stopping SQPOLL thread

We have a tiny race where io_put_sq_data() calls io_sq_thead_stop()
and finds the thread gone, but the thread has indeed not fully
exited or called complete() yet. Close it up by always having
io_sq_thread_stop() wait on completion of the exit event.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c