diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-11-19 08:37:07 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-25 19:56:05 -0700 |
commit | b60fda6000a99a7ccac36005ab78b14b47c06de3 (patch) | |
tree | a67c574d4f9fbe463204c60735405c7779c52356 /.gitignore | |
parent | fba38c272a0385148935d6443cb9dc68cf1f37a7 (diff) | |
download | linux-b60fda6000a99a7ccac36005ab78b14b47c06de3.tar.bz2 |
io-wq: wait for io_wq_create() to setup necessary workers
We currently have a race where if setup is really slow, we can be
calling io_wq_destroy() before we're done setting up. This will cause
the caller to get stuck waiting for the manager to set things up, but
the manager already exited.
Fix this by doing a sync setup of the manager. This also fixes the case
where if we failed creating workers, we'd also get stuck.
In practice this race window was really small, as we already wait for
the manager to start. Hence someone would have to call io_wq_destroy()
after the task has started, but before it started the first loop. The
reported test case forked tons of these, which is why it became an
issue.
Reported-by: syzbot+0f1cc17f85154f400465@syzkaller.appspotmail.com
Fixes: 771b53d033e8 ("io-wq: small threadpool implementation for io_uring")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions