lkml.org 
[lkml]   [2011]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-11-24 18:39    [W:1.013 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site