summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/108/other/1460
blob: 7dfaa9e5e6ea56f8f43ec8795dca07da51bab801 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
graphic: 0.762
device: 0.725
network: 0.655
other: 0.628
semantic: 0.604
socket: 0.524
debug: 0.476
performance: 0.464
vnc: 0.462
KVM: 0.398
PID: 0.398
boot: 0.244
files: 0.098
permissions: 0.022

block_load fails if last block is included in snapshot and block device isn't multiple of BLK_MIG_BLOCK_SIZE
Description of problem:
The `block_load` function in `migration/block.c` has a bug where `blk_pwrite` or `blk_pwrite_zeroes` always write `cluster_size` bytes. If the underlying device is not a multiple of `BLK_MIG_BLOCK_SIZE`, the write will fail with -EIO when trying to write past the end of the device, as `blk_check_byte_request` checks the length of the device.

This can be fixed by ensuring that `cur_addr` + write length passed to `blk_pwrite`/`blk_pwrite_zeroes` never exceeds the total length of the block device.