Re: [PATCH] block: Fix start and length check added to iov_iter_extract_bvecs()

From: David Howells

Date: Wed Aug 26 2026 - 15:53:04 EST


Keith Busch <kbusch@xxxxxxxxxx> wrote:

> iov_iter_alignment loops over all the vectors when we only need to
> examine the current one here.

Actually, I don't think that's true. iov_iter_extract_pages() is allowed to
pull from multiple bio_vecs in an ITER_BVEC, for example - and if, say, the
page in the second bio_vec is contiguous with the first, then
iov_iter_extract_bvecs() will use it - so you still need to check bv_len on
it.

David