]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/kbuf: reallocate buf lists on upgrade
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 12 Feb 2025 13:46:46 +0000 (13:46 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 12 Feb 2025 14:30:52 +0000 (07:30 -0700)
commit8802766324e1f5d414a81ac43365c20142e85603
tree1fc1d4e0cec00fb92b67fbc88ec18633a49f9247
parent06521ac0485effdcc9c792cb0b40ed8e6f2f5fb8
io_uring/kbuf: reallocate buf lists on upgrade

IORING_REGISTER_PBUF_RING can reuse an old struct io_buffer_list if it
was created for legacy selected buffer and has been emptied. It violates
the requirement that most of the field should stay stable after publish.
Always reallocate it instead.

Cc: stable@vger.kernel.org
Reported-by: Pumpkin Chang <pumpkin@devco.re>
Fixes: 2fcabce2d7d34 ("io_uring: disallow mixed provided buffer group registrations")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c