[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTed2XpmSJXOZW9j@fedora>
Date: Tue, 9 Dec 2025 11:56:09 +0800
From: Ming Lei <ming.lei@...hat.com>
To: Caleb Sander Mateos <csander@...estorage.com>
Cc: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ublk: don't mutate struct bio_vec in iteration
On Mon, Dec 08, 2025 at 08:14:23PM -0700, Caleb Sander Mateos wrote:
> __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@...estorage.com>
> Fixes: e87d66ab27ac ("ublk: use rq_for_each_segment() for user copy")
Reviewed-by: Ming Lei <ming.lei@...hat.com>
Thanks,
Ming
Powered by blists - more mailing lists