[CRIU] [PATCH] restore: Serialize access to last_pid
Cyrill Gorcunov
gorcunov at gmail.com
Sun Nov 17 12:33:37 MSK 2019
On Sun, Nov 17, 2019 at 01:13:58AM -0800, Andrey Vagin wrote:
> > - return clone(fn, stack_ptr, flags, arg);
> > + context_lock();
> > + ret = clone(fn, stack_ptr, flags, arg);
>
> Here is one more problem. clone can fork a process with a pid which is
> going to be used be one of restored threads.
Well, this helpers will run in serialized mode and they are finished
before we yield new thread. So no, this won't be a problem. The main
problem is that all this looks like a broken archtecture design.
I think we need (well, I need) to think more, maybe a I figure out
some explicit way to handle this.
More information about the CRIU
mailing list