OSDN Git Service

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)
committerPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Jun 2022 08:53:07 +0000 (09:53 +0100)
commitb0380bf6dad4601d92025841e2b7a135d566c6e3
treee13709f00bfd244cca8707cd9475d8be2f697e23
parenta7c41b4687f5902af70cd559806990930c8a307b
io_uring: fix races with file table unregister

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>
fs/io_uring.c