Commit c7d15ba
io_uring/kbuf: flag partial buffer mappings
Commit 178b8ff upstream.
A previous commit aborted mapping more for a non-incremental ring for
bundle peeking, but depending on where in the process this peeking
happened, it would not necessarily prevent a retry by the user. That can
create gaps in the received/read data.
Add struct buf_sel_arg->partial_map, which can pass this information
back. The networking side can then map that to internal state and use it
to gate retry as well.
Since this necessitates a new flag, change io_sr_msg->retry to a
retry_flags member, and store both the retry and partial map condition
in there.
Cc: stable@vger.kernel.org
Fixes: 26ec15e ("io_uring/kbuf: don't truncate end buffer for multiple buffer peeks")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c124f40 commit c7d15ba
3 files changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
191 | | - | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
| |||
401 | 406 | | |
402 | 407 | | |
403 | 408 | | |
404 | | - | |
| 409 | + | |
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
| |||
759 | 764 | | |
760 | 765 | | |
761 | 766 | | |
762 | | - | |
| 767 | + | |
763 | 768 | | |
764 | 769 | | |
765 | 770 | | |
| |||
831 | 836 | | |
832 | 837 | | |
833 | 838 | | |
834 | | - | |
| 839 | + | |
835 | 840 | | |
836 | 841 | | |
837 | 842 | | |
| |||
840 | 845 | | |
841 | 846 | | |
842 | 847 | | |
843 | | - | |
| 848 | + | |
844 | 849 | | |
845 | 850 | | |
846 | 851 | | |
847 | 852 | | |
848 | | - | |
| 853 | + | |
849 | 854 | | |
850 | 855 | | |
851 | 856 | | |
| |||
1089 | 1094 | | |
1090 | 1095 | | |
1091 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
1092 | 1099 | | |
1093 | 1100 | | |
1094 | 1101 | | |
| |||
1285 | 1292 | | |
1286 | 1293 | | |
1287 | 1294 | | |
1288 | | - | |
| 1295 | + | |
1289 | 1296 | | |
1290 | 1297 | | |
1291 | 1298 | | |
| |||
0 commit comments