]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
io_uring: fix races with file table unregister
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Jun 2022 05:32:44 +0000 (06:32 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:27 +0000 (10:53 +0200)
commit75d51314556745e355f1112e448362fdd836c6d0
tree2948aac2051dc4ffd3322675319bba8123469ace
parentb2b7207ac61826285ea6b423bfe3b29d4d6c9605
io_uring: fix races with file table unregister

BugLink: https://bugs.launchpad.net/bugs/1983149
[ Upstream commit b0380bf6dad4601d92025841e2b7a135d566c6e3 ]

Fixed file table quiesce might unlock ->uring_lock, potentially letting
new requests to be submitted, don't allow those requests to use the
table as they will race with unregistration.

Reported-and-tested-by: van fantasy <g1042620637@gmail.com>
Fixes: 05f3fb3c53975 ("io_uring: avoid ring quiesce for fixed file set unregister and update")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/io_uring.c