]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/register: fix ring resizing with mixed/large SQEs/CQEs
authorJens Axboe <axboe@kernel.dk>
Mon, 20 Apr 2026 19:41:38 +0000 (13:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Apr 2026 18:19:08 +0000 (12:19 -0600)
commit45cd95763e198d74d369ede43aef0b1955b8dea4
tree18397619b692ac280ff2315a5956ac18742424a5
parent7faaa6812aba550c24bffdfd9399568223c8a477
io_uring/register: fix ring resizing with mixed/large SQEs/CQEs

The ring resizing only properly handles "normal" sized SQEs or CQEs, if
there are pending entries around a resize. This normally should not be
the case, but the code is supposed to handle this regardless.

For the mixed SQE/CQE cases, the current copying works fine as they
are indexed in the same way. Each half is just copied separately. But
for fixed large SQEs and CQEs, the iteration and copy need to take that
into account.

Cc: stable@kernel.org
Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS")
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/register.c