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

io_uring: acquire 'mm' for task_work for SQPOLL



If we're unlucky with timing, we could be running task_work after
having dropped the memory context in the sq thread. Since dropping
the context requires a runnable task state, we cannot reliably drop
it as part of our check-for-work loop in io_sq_thread(). Instead,
abstract out the mm acquire for the sq thread into a helper, and call
it from the async task work handler.

Cc: stable@vger.kernel.org # v5.7
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent bbde017a
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