Commit cafcc1c8 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Lee Jones
Browse files

UPSTREAM: io_uring/kbuf: reallocate buf lists on upgrade



commit 88027663 upstream.

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.

Bug: 397178232
Cc: stable@vger.kernel.org
Reported-by: default avatarPumpkin Chang <pumpkin@devco.re>
Fixes: 2fcabce2 ("io_uring: disallow mixed provided buffer group registrations")
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 146a185f)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Id44d71a2cf54481d0ed586ba2b9f41ba7436478d
parent 6e4a6861
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment