io_uring: SQPOLL stop error handling fixes
authorJens Axboe <axboe@kernel.dk>
Fri, 26 Feb 2021 18:27:15 +0000 (11:27 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Mar 2021 17:10:30 +0000 (10:10 -0700)
commit8629b37dfa458d265e4636b7adb266642459d322
tree51ddc676de42146865125ac6d607e76987f58631
parentcf9c840b73b6b21672f8abee5682033f52b6be41
io_uring: SQPOLL stop error handling fixes

If we fail to fork an SQPOLL worker, we can hit cancel, and hence
attempted thread stop, with the thread already being stopped. Ensure
we check for that.

Also guard thread stop fully by the sqd mutex, just like we do for
park.

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