]> Gentwo Git Trees - linux/.git/commit
io_uring: fix buffer auto-commit for multishot uring_cmd
authorMing Lei <ming.lei@redhat.com>
Fri, 24 Oct 2025 01:34:59 +0000 (09:34 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Oct 2025 01:41:31 +0000 (19:41 -0600)
commit6f1cbf6d6fd13fc169dde14e865897924cdc4bbd
treeec8fce3e6e953c29ef763f2d3a2e5e603c240973
parentc5efc6a0b3940381d67887302ddb87a5cf623685
io_uring: fix buffer auto-commit for multishot uring_cmd

Commit 620a50c92700 ("io_uring: uring_cmd: add multishot support") added
multishot uring_cmd support with explicit buffer upfront commit via
io_uring_mshot_cmd_post_cqe(). However, the buffer selection path in
io_ring_buffer_select() was auto-committing buffers for non-pollable files,
which conflicts with uring_cmd's explicit upfront commit model.

This way consumes the whole selected buffer immediately, and causes
failure on the following buffer selection.

Fix this by checking uring_cmd to identify operations that handle buffer
commit explicitly, and skip auto-commit for these operations.

Cc: Caleb Sander Mateos <csander@purestorage.com>
Fixes: 620a50c92700 ("io_uring: uring_cmd: add multishot support")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c