diff options
| author | David Wei <[email protected]> | 2025-04-01 19:53:55 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-04-01 20:00:46 +0000 |
| commit | fcfd94d6967a98e88b834c9fd81e73c5f04d83dc (patch) | |
| tree | 2d06c0b20fc2b056647a7af8f5eb8a31046f8ce5 /rust/helpers/task.c | |
| parent | io_uring/net: avoid import_ubuf for regvec send (diff) | |
| download | kernel-fcfd94d6967a98e88b834c9fd81e73c5f04d83dc.tar.gz kernel-fcfd94d6967a98e88b834c9fd81e73c5f04d83dc.zip | |
io_uring/zcrx: return early from io_zcrx_recv_skb if readlen is 0
When readlen is set for a recvzc request, tcp_read_sock() will call
io_zcrx_recv_skb() one final time with len == desc->count == 0. This is
caused by the !desc->count check happening too late. The offset + 1 !=
skb->len happens earlier and causes the while loop to continue.
Fix this in io_zcrx_recv_skb() instead of tcp_read_sock(). Return early
if len is 0 i.e. the read is done.
Fixes: 6699ec9a23f8 ("io_uring/zcrx: add a read limit to recvzc requests")
Signed-off-by: David Wei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions
