diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-02-23 23:34:06 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-24 04:33:38 +0100 |
commit | 8b3e78b5955abb98863832453f5c74eca8f53c3a (patch) | |
tree | 0aca27e4048e91517008e385bd40d85135df751e /.clang-format | |
parent | io_uring: ensure io-wq context is always destroyed for tasks (diff) | |
download | linux-8b3e78b5955abb98863832453f5c74eca8f53c3a.tar.xz linux-8b3e78b5955abb98863832453f5c74eca8f53c3a.zip |
io-wq: fix races around manager/worker creation and task exit
These races have always been there, they are just more apparent now that
we do early cancel of io-wq when the task exits.
Ensure that the io-wq manager sets task state correctly to not miss
wakeups for task creation. This is important if we get a wakeup after
having marked ourselves as TASK_INTERRUPTIBLE. If we do end up creating
workers, then we flip the state back to running, making the subsequent
schedule() a no-op. Also increment the wq ref count before forking the
thread, to avoid a use-after-free.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions