[CRIU] [PATCH 03/14]v3 Fix for open_pages_image_at to read if opened with O_RDWR

Tikhomirov Pavel snorcht at gmail.com
Tue Dec 17 07:27:02 PST 2013


Signed-off-by: Tikhomirov Pavel <snorcht at gmail.com>
---
 image.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/image.c b/image.c
index 2a59d99..5f82900 100644
--- a/image.c
+++ b/image.c
@@ -295,7 +295,7 @@ int open_pages_image_at(int dfd, unsigned long flags, int pm_fd)
 {
 	unsigned id;
 
-	if (flags == O_RDONLY) {
+	if (flags == O_RDONLY || flags == O_RDWR) {
 		PagemapHead *h;
 		if (pb_read_one(pm_fd, &h, PB_PAGEMAP_HEAD) < 0)
 			return -1;
-- 
1.7.9.5



More information about the CRIU mailing list