mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
criu: page-xfer: get_remote_page: respect nr_pages parameter
travis-ci: success for uffd: A new set of improvements Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
20d7eb4c56
commit
c23b83ce3a
@@ -953,6 +953,7 @@ out:
|
||||
int get_remote_pages(int pid, unsigned long addr, int nr_pages, void *dest)
|
||||
{
|
||||
int ret;
|
||||
int len = PAGE_SIZE * nr_pages;
|
||||
|
||||
struct page_server_iov pi;
|
||||
|
||||
@@ -972,8 +973,8 @@ int get_remote_pages(int pid, unsigned long addr, int nr_pages, void *dest)
|
||||
if (pi.nr_pages > nr_pages)
|
||||
return -1;
|
||||
|
||||
ret = recv(page_server_sk, dest, PAGE_SIZE, MSG_WAITALL);
|
||||
if (ret != PAGE_SIZE)
|
||||
ret = recv(page_server_sk, dest, len, MSG_WAITALL);
|
||||
if (ret != len)
|
||||
return -1;
|
||||
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user