[CRIU] [PATCH] mm: initialize PageEntry pe to NULL in PagemapEntry

Andrey Vagin avagin at openvz.org
Thu Jun 20 17:49:53 EDT 2013


Otherwise it contains trash and BUG at page-read.c:98 may be triggered.

https://bugzilla.openvz.org/show_bug.cgi?id=2633

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 page-read.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/page-read.c b/page-read.c
index 1659600..7de69d2 100644
--- a/page-read.c
+++ b/page-read.c
@@ -179,6 +179,8 @@ err_cl:
 
 static int open_page_read_at(int dfd, int pid, struct page_read *pr)
 {
+	pr->pe = NULL;
+
 	pr->fd = open_image_at(dfd, CR_FD_PAGEMAP, O_RSTR, (long)pid);
 	if (pr->fd < 0) {
 		pr->fd_pg = open_image_at(dfd, CR_FD_PAGES_OLD, O_RSTR, pid);
-- 
1.8.2.1



More information about the CRIU mailing list