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:21:07 +0000 (10:21 -0700)
commit469855d180def56ef997faab202a19ca84f939de
tree0c89c074b6b18b060a1e68b6744f124dc9f69516
parentbdfffb0f6afcc8f3de569bcf7ae3f261e7163d1d
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