Skip to content

Conversation

@blktests-ci
Copy link

@blktests-ci blktests-ci bot commented Dec 9, 2025

Pull request for series with
subject: ublk: don't mutate struct bio_vec in iteration
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1031540

@blktests-ci
Copy link
Author

blktests-ci bot commented Dec 9, 2025

Upstream branch: c2f2b01
series: https://patchwork.kernel.org/project/linux-block/list/?series=1031540
version: 1

@blktests-ci
Copy link
Author

blktests-ci bot commented Dec 9, 2025

Upstream branch: c2f2b01
series: https://patchwork.kernel.org/project/linux-block/list/?series=1031540
version: 1

__bio_for_each_segment() uses the returned struct bio_vec's bv_len field
to advance the struct bvec_iter at the end of each loop iteration. So
it's incorrect to modify it during the loop. Don't assign to bv_len (or
bv_offset, for that matter) in ublk_copy_user_pages().

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: e87d66a ("ublk: use rq_for_each_segment() for user copy")
Reviewed-by: Ming Lei <ming.lei@redhat.com>
@blktests-ci blktests-ci bot force-pushed the series/1031540=>linus-master branch from 3c7260e to add5af5 Compare December 9, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants