Messages in this thread | | | Date | Thu, 24 Nov 2011 18:31:21 +0100 | From | Oleg Nesterov <> | Subject | Re: [RFC][PATCH 0/3] fork: Add the ability to create tasks with given pids |
| |
On 11/24, Pavel Emelyanov wrote: > > Hm... Started testing this stuff and thought about Pedro's wish to use this > in gdb one more time :( > > The thing is, that we (in checkpoint/restore) are going to use this sysctl > when creating a pid namespace from scratch, thus having full control over > all the forks happening in this namespace. > > But when it comes to the ability for gdb to create a task with a given pid in > a _living_ namespace this solution simply won't work! It doesn't guarantee, > that after setting the last_pid via sysctl this last_pid stays the same at > the time we do call fork()/clone(). Because there are other tasks that can call > fork themselves ignoring any lask_pid locking we can play with.
Sure. ->last_pid is a hint, nothing more.
But nothing can work reliably on the running system. Even if we can't race with another fork(), the required pid_nr can be already in use.
Oleg.
| |