diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2020-10-13 09:44:00 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2020-10-17 09:25:43 -0600 |
| commit | 216578e55ac932cf5e348d9e65d8e129fc9e34cc (patch) | |
| tree | 63a16a72d155a8c65c50480a4fe08c84c39fff79 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | |
| parent | 4edf20f9990230e9b85e79954d5cd28fc93616e9 (diff) | |
io_uring: fix REQ_F_COMP_LOCKED by killing it
REQ_F_COMP_LOCKED is used and implemented in a buggy way. The problem is
that the flag is set before io_put_req() but not cleared after, and if
that wasn't the final reference, the request will be freed with the flag
set from some other context, which may not hold a spinlock. That means
possible races with removing linked timeouts and unsynchronised
completion (e.g. access to CQ).
Instead of fixing REQ_F_COMP_LOCKED, kill the flag and use
task_work_add() to move such requests to a fresh context to free from
it, as was done with __io_free_req_finish().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
0 files changed, 0 insertions, 0 deletions
