io_uring: revise completion_lock locking
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 2 Dec 2022 17:47:23 +0000 (17:47 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Dec 2022 15:53:04 +0000 (08:53 -0700)
commit6971253f078766543c716db708ba2c787826690d
tree39d199c16153315c53da8cd2198c7e067f1263d9
parentea011ee10231f5fa6cbb415007048ca0bb948baf
io_uring: revise completion_lock locking

io_kill_timeouts() doesn't post any events but queues everything to
task_work. Locking there is needed for protecting linked requests
traversing, we should grab completion_lock directly instead of using
io_cq_[un]lock helpers. Same goes for __io_req_find_next_prep().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/88e75d481a65dc295cb59722bb1cf76402d1c06b.1670002973.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h
io_uring/timeout.c