[CRIU] [PATCH] kerndat: set uffd features to 0 before querying kernel

Mike Rapoport rppt at linux.vnet.ibm.com
Mon Aug 21 06:53:33 MSK 2017


When there is a stale kdat cache file it's contents is read into the memory
and we end up requesting random userfaultfd features. Explicitly set the
kdat.uffd_features to zero before querying the kernel resolves the issue.

Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/kerndat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/criu/kerndat.c b/criu/kerndat.c
index 31eaddb..0c8588a 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -874,6 +874,7 @@ int kerndat_uffd(void)
 {
 	int uffd;
 
+	kdat.uffd_features = 0;
 	uffd = uffd_open(0, &kdat.uffd_features);
 
 	/*
-- 
2.7.4



More information about the CRIU mailing list