io_uring/net: mark iov as dynamically allocated even for single segments
authorJens Axboe <axboe@kernel.dk>
Wed, 25 Jun 2025 16:17:06 +0000 (10:17 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 25 Jun 2025 16:17:06 +0000 (10:17 -0600)
commit9a709b7e98e6fa51600b5f2d24c5068efa6d39de
tree3b43fd5fbd6fe88d858b53c3f90d7a16290c5a16
parent7cac633a42a7b3c8146eb1db76fb80dc652998de
io_uring/net: mark iov as dynamically allocated even for single segments

A bigger array of vecs could've been allocated, but
io_ring_buffers_peek() still decided to cap the mapped range depending
on how much data was available. Hence don't rely on the segment count
to know if the request should be marked as needing cleanup, always
check upfront if the iov array is different than the fast_iov array.

Fixes: 26ec15e4b0c1 ("io_uring/kbuf: don't truncate end buffer for multiple buffer peeks")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c