Skip to content
Commit fa84693b authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: ensure IORING_REGISTER_IOWQ_MAX_WORKERS works with SQPOLL

SQPOLL has a different thread doing submissions, we need to check for
that and use the right task context when updating the worker values.
Just hold the sqd->lock across the operation, this ensures that the
thread cannot go away while we poke at ->io_uring.

Link: https://github.com/axboe/liburing/issues/420
Fixes: 2e480058

 ("io-wq: provide a way to limit max number of workers")
Reported-by: default avatarJohannes Lundberg <johalun0@gmail.com>
Tested-by: default avatarJohannes Lundberg <johalun0@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3146cba9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment