-
Andrey Vagin authored
Currently we marks all mounts as private before restoring mntns. We do these to avoid problem with pivot_root. It's wrong, because the root mount can be slave for an external shared group. The root mount is not mounted by CRIU, so here is nothing wrong. Now look at the pivot_root code in kernel if (IS_MNT_SHARED(old_mnt) || IS_MNT_SHARED(new_mnt->mnt_parent) || IS_MNT_SHARED(root_mnt->mnt_parent)) goto out4; So we don't need to change options for all mounts. We need to remount / and the parent of the new root. It's safe, because we already in another mntns. v2: simplify code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
c5afed06