[CRIU] [PATCH 2/2]v2 page-read: check function return value
Tikhomirov Pavel
snorcht at gmail.com
Mon Dec 2 02:53:30 PST 2013
Signed-off-by: Tikhomirov Pavel <snorcht at gmail.com>
---
page-read.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/page-read.c b/page-read.c
index 8855977..43f1b2a 100644
--- a/page-read.c
+++ b/page-read.c
@@ -127,6 +127,8 @@ static int read_pagemap_page(struct page_read *pr, unsigned long vaddr, void *bu
if (pr->pe->in_parent) {
pr_debug("\tpr%u Read page %lx from parent\n", pr->id, vaddr);
ret = read_pagemap_page_from_parent(pr->parent, vaddr, buf, 0);
+ if (ret == -1)
+ return ret;
} else {
pr_debug("\tpr%u Read page %lx from self %lx/%"PRIx64"\n", pr->id,
vaddr, pr->cvaddr, lseek(pr->fd_pg, 0, SEEK_CUR));
--
1.7.9.5
More information about the CRIU
mailing list