Skip to content

Commit

Permalink
io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import…
Browse files Browse the repository at this point in the history
…_fixed

BugLink: https://bugs.launchpad.net/bugs/2075154

[ Upstream commit a23800f ]

In io_import_fixed when advancing the iter within the first bvec, the
iter->nr_segs is set to bvec->bv_len. nr_segs should be the number of
bvecs, plus we don't need to adjust it here, so just remove it.

Fixes: b000ae0 ("io_uring/rsrc: optimise single entry advance")
Signed-off-by: Chenliang Li <[email protected]>
Reviewed-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Manuel Diewald <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>
Signed-off-by: Roxana Nicolescu <[email protected]>
  • Loading branch information
Chenliang Li authored and roxanan1996 committed Aug 13, 2024
1 parent 66ba470 commit fed7a37
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion io_uring/rsrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,6 @@ int io_import_fixed(int ddir, struct iov_iter *iter,
* branch doesn't expect non PAGE_SIZE'd chunks.
*/
iter->bvec = bvec;
iter->nr_segs = bvec->bv_len;
iter->count -= offset;
iter->iov_offset = offset;
} else {
Expand Down

0 comments on commit fed7a37

Please sign in to comment.