diff options
| author | Siddharth Chintamaneni <sidchintamaneni@gmail.com> | 2026-11-16 19:31:46 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-11-16 19:48:35 -0700 |
| commit | b7322810d1870ccc0d293ad383d94ef583d5057b (patch) | |
| tree | cbffcfcf6739089149b2dc4135dca7ede54444a7 /rust/kernel/alloc/allocator | |
| parent | e5a346e4309d720c47fe8331a00068608fad47dd (diff) | |
io_uring/kbuf: initialize arg->out_len from arg->max_len in io_buffers_select()
io_buffers_select() passes &arg->out_len to io_provided_buffers_select()
on the legacy provided-buffer path. Because callers initialize
arg->max_len (from sqe->len) while leaving arg->out_len as 0,
io_provided_buffers_select() sees *len == 0 and always selects the full
buffer size buf->len, ignoring the user-specified sqe->len limit.
Initialize arg->out_len = arg->max_len before calling
io_provided_buffers_select().
Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers")
Signed-off-by: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
Link: https://patch.msgid.link/20261116193146.65315-1-sidchintamaneni@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions
