]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix io_prep_async_link locking
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 26 Jul 2021 13:14:31 +0000 (14:14 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Jul 2021 14:58:04 +0000 (08:58 -0600)
commit572478267c8f03f604f553399e58d94e14df982a
tree4cf9efc5d01517033f807345b27674e137fba238
parent574e03c50396802dda74b004e51603342bbc0db3
io_uring: fix io_prep_async_link locking

io_prep_async_link() may be called after arming a linked timeout,
automatically making it unsafe to traverse the linked list. Guard
with completion_lock if there was a linked timeout.

Cc: stable@vger.kernel.org # 5.9+
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/93f7c617e2b4f012a2a175b3dab6bc2f27cebc48.1627304436.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c