Skip to content
Commit 38daf50f authored by Fyodor's avatar Fyodor Committed by Pavel Emelyanov
Browse files

page-xfer: fix wrong hole address offset



CRIU doesn't save vaddr of each anon shmem page in anon shared mem pagemap img.
It saves page offset from the beginning of anon shared memory area.
CRIU calls page_xfer_dump_pages() with non zero @off argument
to convert dumper virtual addresses to such offsets.

The problem is in page_xfer_dump_pages() code. It substracts @off
only for pages in pagemap but not for holes in pagemap.
Bug is fixed in this patch.
This patch is just a copy-paste of valid code path for pages to code path for holes.

Bug is not currently reproduced in CRIU because:
1. Only anon shmem provides non-zero @off value to page_xfer_dump_pages()
2. Anon shared memory doesn't create holes in its pagemap (for now)

This bugfix is a preparation for anon shared memory deduplication patchset.

Signed-off-by: default avatarFyodor Bocharov <fbocharov@yandex.ru>
Signed-off-by: default avatarEugene Batalov <eabatalov89@gmail.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 2a250921
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment