[CRIU] [PATCH] mount: sysfs -- Use slave mounting for the root

Andrey Vagin avagin at virtuozzo.com
Mon Jul 25 15:25:39 PDT 2016


On Tue, Jul 26, 2016 at 01:02:59AM +0300, Cyrill Gorcunov wrote:
> Seems this snippet escaeped from commit
> 84bf1ad467942a145a9df99d1397a63817893a91
> so we may get -EBUSY in open_detach_mount.
>

Acked-by: Andrey Vagin <avagin at virtuozzo.com>
 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  criu/net.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/net.c b/criu/net.c
> index a6d5f001bbc0..a03c168a2bf9 100644
> --- a/criu/net.c
> +++ b/criu/net.c
> @@ -1390,7 +1390,7 @@ static int mount_ns_sysfs(void)
>  		return -1;
>  	}
>  
> -	if (mount(NULL, "/", NULL, MS_PRIVATE | MS_REC, NULL)) {
> +	if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL)) {
>  		pr_perror("Can't mark the root mount as private");
>  		return -1;
>  	}
> -- 
> 2.7.4
> 


More information about the CRIU mailing list