[CRIU] [PATCH] unshare: Check private remount error code

Andrey Vagin avagin at virtuozzo.com
Wed Mar 16 09:48:51 PDT 2016


On Wed, Mar 16, 2016 at 03:25:05PM +0300, Pavel Emelyanov wrote:
> 
> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>

Acked-by: Andrey Vagin <avagin at virtuozzo.com>

> ---
>  criu/mount.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/criu/mount.c b/criu/mount.c
> index 9757799..754bf27 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -3196,7 +3196,11 @@ int prepare_mnt_ns(void)
>  		}
>  
>  		if (opts.unshare_flags & UNSHARE_MOUNT_PROC) {
> -			mount(NULL, "/proc", NULL, MS_PRIVATE, NULL);
> +			if (mount(NULL, "/proc", NULL, MS_PRIVATE, NULL)) {
> +				pr_perror("Can't make proc private for unshare");
> +				return -1;
> +			}
> +
>  			if (mount("proc", "/proc", "proc",
>  						MS_MGC_VAL | MS_NOSUID | MS_NOEXEC | MS_NODEV,
>  						NULL)) {
> -- 
> 2.5.0


More information about the CRIU mailing list