Commit b419bed
committed
io_uring/rsrc: ensure segments counts are correct on kbuf buffers
kbuf imports have the front offset adjusted and segments removed, but
the tail segments are still included in the segment count that gets
passed in the iov_iter. As the segments aren't necessarily all the
same size, move importing to a separate helper and iterate the
mapped length to get an exact count.
Reviewed-by: Nitesh Shetty <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>1 parent 80c7378 commit b419bed
1 file changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1035 | 1055 | | |
1036 | 1056 | | |
1037 | 1057 | | |
| |||
1052 | 1072 | | |
1053 | 1073 | | |
1054 | 1074 | | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1075 | + | |
| 1076 | + | |
1060 | 1077 | | |
1061 | 1078 | | |
1062 | 1079 | | |
| |||
0 commit comments