[CRIU] [PATCH 1/2] mnt: do_new_mount should restore sharing

Tycho Andersen tycho.andersen at canonical.com
Wed Apr 15 12:17:40 PDT 2015


The function masks off sharing in the initial setting, but doesn't correctly
reset the flags afterwards.

CC: Oleg Nesterov <oleg at redhat.com>
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 mount.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mount.c b/mount.c
index 1d8f486..17f97a2 100644
--- a/mount.c
+++ b/mount.c
@@ -1789,7 +1789,9 @@ static int do_new_mount(struct mount_info *mi)
 		return -1;
 	}
 
-	if (restore_shared_options(mi, 0, mi->shared_id, 0))
+	if (restore_shared_options(mi, !mi->shared_id && !mi->master_id,
+					mi->shared_id,
+					mi->master_id))
 		return -1;
 
 	mi->mounted = true;
-- 
2.1.4



More information about the CRIU mailing list