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

io-wq: kill hashed waitqueue before manager exits

If we race with shutting down the io-wq context and someone queueing
a hashed entry, then we can exit the manager with it armed. If it then
triggers after the manager has exited, we can have a use-after-free where
io_wqe_hash_wake() attempts to wake a now gone manager process.

Move the killing of the hashed write queue into the manager itself, so
that we know we've killed it before the task exits.

Fixes: e941894e

 ("io-wq: make buffered file write hashed work map per-ctx")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b5b0ecb7
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