mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-04 07:43:23 +00:00
pagemap: detect EOF on truncated pages in process_async_reads()
Signed-off-by: Lorenzo Fontana <fontanalorenz@gmail.com>
This commit is contained in:
parent
f21a484253
commit
d990bd76e8
1 changed files with 6 additions and 0 deletions
|
|
@ -559,6 +559,12 @@ static int process_async_reads(struct page_read *pr)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (ret == 0 && piov->end != piov->from) {
|
||||
pr_err("Unexpected EOF reading pages: expected %ju more bytes at offset %ju\n",
|
||||
piov->end - piov->from, piov->from);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (opts.auto_dedup && punch_hole(pr, piov->from, ret, false))
|
||||
return -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue