summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTamaki Yanagawa <ty@000ty.net>2026-10-18 04:22:32 +0000
committerJens Axboe <axboe@kernel.dk>2026-10-19 15:01:45 -0600
commit96262cfab554cf11412de7a6247f0e82c94e130f (patch)
tree70db9f5100fab92536c473bed26bb56c27018947 /tools/lib/python
parent98787d3fa4e99564d2b2bc21255b21f670c450d0 (diff)
io_uring/net: keep recv buffer select length within MAX_RW_COUNT
Since commit dcbd1c054848 ("io_uring/net: let io_recv_buf_select return the length of the buffer region"), io_recv_buf_select() returns the selected length as an int. For a non-bundle recv with sqe->len == 0 the length comes from the ring provided buffer, which can be up to 4G, so a buffer of 2G or more makes io_recv() fail the request with a bogus negative result (e.g. -2147483648) instead of receiving into it. Clamp the length to MAX_RW_COUNT, which import_ubuf() limits the transfer to anyway. Fixes: dcbd1c054848 ("io_uring/net: let io_recv_buf_select return the length of the buffer region") Cc: stable@vger.kernel.org Signed-off-by: Tamaki Yanagawa <ty@000ty.net> Assisted-by: Claude:claude-opus-5-5 Link: https://patch.msgid.link/20261018042227.1105-1-ty@000ty.net Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions