io_uring: fix races with buffer table unregister
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Jun 2022 05:30:06 +0000 (06:30 +0100)
committerPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Jun 2022 08:53:27 +0000 (09:53 +0100)
commitd11d31fc5d8a96f707facee0babdcffaafa38de2
treeec59fcf6033dbbd60c4856d5e49469fb52a8cc28
parentb0380bf6dad4601d92025841e2b7a135d566c6e3
io_uring: fix races with buffer table unregister

Fixed buffer 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: bd54b6fe3316ec ("io_uring: implement fixed buffers registration similar to fixed files")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
fs/io_uring.c