Re: [PATCH 11/20] ublk: move offset check out of __ublk_check_and_get_req()

From: Ming Lei
Date: Thu Dec 25 2025 - 21:16:20 EST


On Tue, Dec 16, 2025 at 10:34:45PM -0700, Caleb Sander Mateos wrote:
> __ublk_check_and_get_req() checks that the passed in offset is within
> the data length of the specified ublk request. However, only user copy
> (ublk_check_and_get_req()) supports accessing ublk request data at a
> nonzero offset. Zero-copy buffer registration (ublk_register_io_buf())
> always passes 0 for the offset, so the check is unnecessary. Move the
> check from __ublk_check_and_get_req() to ublk_check_and_get_req().
>
> Signed-off-by: Caleb Sander Mateos <csander@xxxxxxxxxxxxxxx>

Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>


Thanks,
Ming