]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: fix link lookup racing with link timeout
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 5 Nov 2020 22:31:37 +0000 (22:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:39:10 +0000 (12:39 +0100)
commiteafe730e12a933cf06dfb2ccf214cd0857429c09
treea48afad50ee3f985d32bd870fd68f01ab4e23331
parentf12882d431184717a21eaa4009cf9e44cf9ff749
io_uring: fix link lookup racing with link timeout

commit 9a472ef7a3690ac0b77ebfb04c88fa795de2adea upstream.

We can't just go over linked requests because it may race with linked
timeouts. Take ctx->completion_lock in that case.

Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Pavel Begunkov <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