]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: correct link-list traversal locking
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 23 Nov 2021 01:45:35 +0000 (01:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:42 +0000 (09:04 +0100)
commitef6a47efe39d55087f4bb8c0c5d2ad86562e00fc
treee9d32bae8cd72bae84a7537f35d2ccf0ea9ab096
parent297cef4b6628d98c376c77a0fc4c428b7043e6c6
io_uring: correct link-list traversal locking

commit e3b5f8da071509f067f530371229be6e7d710f58 upstream.

As io_remove_next_linked() is now under ->timeout_lock (see
io_link_timeout_fn), we should update locking around io_for_each_link()
and io_match_task() to use the new lock.

Cc: stable@kernel.org # 5.15+
Fixes: 0345cea7b28a7 ("io_uring: run timeouts from task_work")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/b54541cedf7de59cb5ae36109e58529ca16e66aa.1637631883.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c