mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-24 02:29:23 +00:00
lazy-pages: fix searching for the page at #PF time
After commit a97d6d3f1609 (pagemap: replace seek_page with seek_pagemap method), uffd only searches the pagemap containing the faulting page, but it not for the page itself. For local restore it causes wrong data to be read from pages*img and subsequent crash of the restored process. Adding a call to pr->skip_pages fixes the problem. travis-ci: success for lazy-pages: fix searching for the page at #PF time Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
c89a22a8e9
commit
450981caf0
1 changed files with 2 additions and 0 deletions
|
|
@ -604,6 +604,8 @@ static int uffd_seek_or_zero_pages(struct lazy_pages_info *lpi, __u64 address,
|
|||
if (pagemap_zero(lpi->pr.pe))
|
||||
return uffd_zero(lpi, address, nr);
|
||||
|
||||
lpi->pr.skip_pages(&lpi->pr, address - lpi->pr.pe->vaddr);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue