[CRIU] [PATCH] parasite: don't use a process stack to unmap a parasite blob

Mike Rapoport mike.rapoport at gmail.com
Thu Aug 18 00:31:56 PDT 2016


On Thu, Aug 18, 2016 at 9:37 AM, Andrei Vagin <avagin at openvz.org> wrote:
> From: Andrei Vagin <avagin at virtuozzo.com>
>
> Process private memory was dumped at this moment, but a memory
> tracker isn't reseted, so we can't use a process memory here.
>
> https://github.com/xemul/criu/issues/203
>
> Cc: Eugene Batalov <eabatalov89 at gmail.com>
> Cc: Fyodor Bocharov <fbocharov at yandex.ru>
> Cc: Mike Rapoport <rppt at linux.vnet.ibm.com>
> Fixes: 101e3ba49d08 ("mem: reset SOFT_DIRTY bits after dumping of all vmas in the process")
> Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
> ---
>  criu/parasite-syscall.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
> index 79d04a7..18923a5 100644
> --- a/criu/parasite-syscall.c
> +++ b/criu/parasite-syscall.c
> @@ -1216,7 +1216,7 @@ int parasite_unmap(struct parasite_ctl *ctl, unsigned long addr)
>         pid_t pid = ctl->pid.real;
>         int ret = -1;
>
> -       ret = parasite_run(pid, PTRACE_SYSCALL, addr, NULL, &regs, &ctl->orig);
> +       ret = parasite_run(pid, PTRACE_SYSCALL, addr, ctl->rstack, &regs, &ctl->orig);

Just curious, why parasite would use dumpee stack?
Wouldn't it make sense to always run with ctl->rstack?

>         if (ret)
>                 goto err;
>
> --
> 2.7.4
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



-- 
Sincerely yours,
Mike.


More information about the CRIU mailing list