Files
linux-nf/io_uring
Jens Axboe f4d0668b38 io_uring/openclose: fix io_pipe_fixed() slot tracking for specific slots
__io_fixed_fd_install() returns 0 on success for non-alloc mode
(specific slot), not the slot index. io_pipe_fixed() used this return
value directly as the slot index in fds[], which can cause the reported
values returned via copy_to_user() to be incorrect, or the error path
operating on the incorrect direct descriptor.

Fix by computing the actual 0-based slot index (slot - 1) for specific
slot mode, while preserving the existing behavior for auto-alloc mode
where __io_fixed_fd_install() already returns the allocated index.

Cc: stable@vger.kernel.org
Fixes: 53db8a71ec ("io_uring: add support for IORING_OP_PIPE")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-02-11 20:31:21 -07:00
..
2025-01-28 15:10:40 -07:00
2026-01-05 17:08:20 -07:00
2025-02-17 16:43:04 -08:00
2025-12-28 15:54:45 -07:00
2026-01-13 15:18:07 -05:00
2024-02-09 09:04:39 -07:00
2025-11-13 11:19:37 -07:00