[CRIU] [PATCH] mount: Add a detailed error message when opts.root is NULL

Andrei Vagin avagin at virtuozzo.com
Mon Sep 10 21:55:22 MSK 2018


Applied, thanks!

BTW: This patch is corrupted, we recomend to use git-send-email to avoid
this.

On Tue, Sep 04, 2018 at 12:05:53PM +0900, Kondo, Uchio wrote:
> Signed-off-by: Uchio KONDO <udzura at udzura.jp>
> ---
>  criu/mount.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/criu/mount.c b/criu/mount.c
> index d95e6033..c7c06ea2 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -2476,6 +2476,11 @@ static int do_mount_one(struct mount_info *mi)
>         pr_debug("\tMounting %s @%s (%d)\n", mi->fstype->name,
> mi->mountpoint, mi->need_plugin);
> 
>         if (rst_mnt_is_root(mi)) {
> +               if (opts.root == NULL) {
> +                       pr_err("Option --root is required to restore
> processes with pivot_root\n");
> +                       return -1;
> +               }
> +
>                 /* do_mount_root() is called from populate_mnt_ns() */
>                 if (mount(opts.root, mi->mountpoint, NULL, MS_BIND |
> MS_REC, NULL))
>                         return -1;
> -- 
> 2.17.0

> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list