diff options
| author | Jens Axboe <axboe@kernel.dk> | 2026-02-11 15:12:13 -0700 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 07:21:28 -0500 |
| commit | cc54e0eeee01ae88adaaae370ccb8091b8b4f2af (patch) | |
| tree | 681efc2b9872cfef60903bf2ecdb8f8cb54c3407 /include/net/aligned_data.h | |
| parent | 749b5e65ab699e8630070bfba2f44be18db69626 (diff) | |
io_uring/openclose: fix io_pipe_fixed() slot tracking for specific slots
[ Upstream commit f4d0668b38d8784f33a9a36c72ed5d0078247538 ]
__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: 53db8a71ecb4 ("io_uring: add support for IORING_OP_PIPE")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
