[CRIU] [PATCH 1/2] mnt: do_new_mount should restore sharing
Andrew Vagin
avagin at odin.com
Fri Apr 17 08:58:34 PDT 2015
On Wed, Apr 15, 2015 at 01:17:40PM -0600, Tycho Andersen wrote:
> 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,
Could you explain this? If we talk about external mount, we need to give
true here if host_mi->shared_id isn't equal to mi->shared_id.
> + mi->shared_id,
> + mi->master_id))
> return -1;
>
> mi->mounted = true;
> --
> 2.1.4
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list