mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 17:32:32 +00:00
Fix up the divisor calculating the number of zone sectors being read and
handle a read that straddles the zone write pointer. The length is
rounded up a sector boundary, so be sure to truncate any excess bytes
off to avoid copying past the data segment.
Fixes: 3451cf34f5 ("null_blk: allow byte aligned memory offsets")
Signed-off-by: Keith Busch <[email protected]>
Tested-by: Bart van Assche <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>