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:Pumpkin Chang <pumpkin@devco.re> Fixes: 2fcabce2 ("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> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 146a185f) Signed-off-by:
Lee Jones <joneslee@google.com> Change-Id: Id44d71a2cf54481d0ed586ba2b9f41ba7436478d
Loading
Please sign in to comment