diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-02-23 15:34:06 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-02-23 20:33:38 -0700 |
commit | 8b3e78b5955abb98863832453f5c74eca8f53c3a (patch) | |
tree | 0aca27e4048e91517008e385bd40d85135df751e /net/netfilter | |
parent | 8a378fb096a7f02943c72a428bbfd0029260efb6 (diff) |
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 'net/netfilter')
0 files changed, 0 insertions, 0 deletions