[CRIU] [PATCH] crtools: don't prevent to dump memory mappings on /dev/zero
Andrey Vagin
avagin at openvz.org
Wed Jan 16 10:03:55 EST 2013
Oracle has such mappings.
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/util.h | 2 ++
proc_parse.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/util.h b/include/util.h
index 0fa5003..6ce0783 100644
--- a/include/util.h
+++ b/include/util.h
@@ -263,6 +263,8 @@ int do_open_proc(pid_t pid, int flags, const char *fmt, ...);
#define pr_img_head(type, ...) pr_msg("\n"#type __VA_ARGS__ "\n----------------\n")
#define pr_img_tail(type) pr_msg("----------------\n")
+#define DEVZERO (makedev(1, 5))
+
#define KDEV_MINORBITS 20
#define KDEV_MINORMASK ((1UL << KDEV_MINORBITS) - 1)
#define MKKDEV(ma, mi) (((ma) << KDEV_MINORBITS) | (mi))
diff --git a/proc_parse.c b/proc_parse.c
index e641cb4..034db10 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -301,7 +301,8 @@ int parse_smaps(pid_t pid, struct list_head *vma_area_list, bool use_map_files)
pr_perror("Failed fstat on %d's map %lu", pid, start);
goto err;
}
- if (!S_ISREG(st_buf.st_mode)) {
+
+ if (!S_ISREG(st_buf.st_mode) && (st_buf.st_rdev != DEVZERO)) {
pr_err("Can't handle non-regular mapping on %d's map %lu\n", pid, start);
goto err;
}
--
1.7.11.7
More information about the CRIU
mailing list