Commit 3a08988
committed
io_uring/net: only retry recv bundle for a full transfer
If a shorter than assumed transfer was seen, a partial buffer will have
been filled. For that case it isn't sane to attempt to fill more into
the bundle before posting a completion, as that will cause a gap in
the received data.
Check if the iterator has hit zero and only allow to continue a bundle
operation if that is the case.
Also ensure that for putting finished buffers, only the current transfer
is accounted. Otherwise too many buffers may be put for a short transfer.
Link: axboe/liburing#1409
Cc: stable@vger.kernel.org
Fixes: 7c71a0a ("io_uring/net: improve recv bundles")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent a7d755e commit 3a08988
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
830 | | - | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
831 | 833 | | |
832 | 834 | | |
833 | 835 | | |
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
837 | | - | |
838 | | - | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
839 | 845 | | |
840 | 846 | | |
841 | | - | |
| 847 | + | |
842 | 848 | | |
843 | 849 | | |
844 | 850 | | |
| |||
0 commit comments