diff options
| author | 2022-03-19 18:04:41 -0600 | |
|---|---|---|
| committer | 2022-03-20 07:23:57 -0600 | |
| commit | abdad709ed8fe4fd3b865ed1010de37a49601ff4 (patch) | |
| tree | 93e232115062ce069401429d6d31b7b451ca420a /samples/git:/ssh:/git@git.zx2c4.com | |
| parent | io_uring: terminate manual loop iterator loop correctly for non-vecs (diff) | |
| download | linux-dev-abdad709ed8fe4fd3b865ed1010de37a49601ff4.tar.xz linux-dev-abdad709ed8fe4fd3b865ed1010de37a49601ff4.zip | |
io_uring: recycle provided before arming poll
We currently have a race where we recycle the selected buffer if poll
returns IO_APOLL_OK. But that's too late, as the poll could already be
triggering or have triggered. If that race happens, then we're putting a
buffer that's already being used.
Fix this by recycling before we arm poll. This does mean that we'll
sometimes almost instantly re-select the buffer, but it's rare enough in
testing that it should not pose a performance issue.
Fixes: b1c62645758e ("io_uring: recycle provided buffers if request goes async")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'samples/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
