[CRIU] [PATCH] restore: Set CLONE_PARENT iif pdeath_sig is present, v4
Tycho Andersen
tycho.andersen at canonical.com
Thu Aug 14 11:02:30 PDT 2014
Hi Cyrill,
On Thu, Aug 14, 2014 at 09:54:17PM +0400, Cyrill Gorcunov wrote:
> On Thu, Aug 14, 2014 at 09:48:25PM +0400, Andrew Vagin wrote:
> > > static inline int fork_with_pid(struct pstree_item *item)
> > > {
> > > int ret = -1, fd;
> > > @@ -951,6 +982,9 @@ static inline int fork_with_pid(struct pstree_item *item)
> > > pr_err("Unknown task state %d\n", item->state);
> > > return -1;
> > > }
> > > +
> > > + if (unlikely(item->pid.virt != INIT_PID))
> >
> > == ?
>
> thanks, forgot to merge update. attached
>
> From 319562dbe5a6ec7647a121f4fd47e2234bb4ee17 Mon Sep 17 00:00:00 2001
> From: Cyrill Gorcunov <gorcunov at openvz.org>
> Date: Thu, 14 Aug 2014 19:34:30 +0400
> Subject: [PATCH] restore: Set CLONE_PARENT iif pdeath_sig is present, v3
>
> It's been discovered that on 3.11 we might fail on restore
> if pass @CLONE_PARENT flag into clone() call due to kernel
> limitations.
>
> Because we're treating 3.11 as a base working kernel lets
> do a trick instead
>
> - setup this flag iif pdeath_sig is present
> - if CLONE_NEWPID is passed warn a user about
> potential consequences.
>
> v2 (by xemul@):
>
> - because we need to carry the condition in attach_to_tasks
> call, introduce @root_as_sibling variable for this.
>
> v3 (by avagin@):
>
> - move condition out of helper
>
> CC: Tycho Andersen <tycho.andersen at canonical.com>
This works for me:
Acked-by: Tycho Andersen <tycho.andersen at canonical.com>
More information about the CRIU
mailing list