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>
Thu, 4 Mar 2021 13:34:01 +0000 (06:34 -0700)
commite54945ae947fb881212a4b97d5599a01bba6ad06
tree7e0a81ee742bbba6d10c031a26d7ecbfd8f2ec5d
parent470ec4ed8c91b4db398ad607c700e9ce88365202
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