[RFC][PATCH 3/6] pid namespace : use struct pid_nr

Eric W. Biederman ebiederm at xmission.com
Tue Mar 13 01:22:23 PDT 2007


sukadev at us.ibm.com writes:

> I thought about keeping track of parent pid namespace, but did
> find the need for it yet.  When do we expect to walk parent/
> ancestor pid namespaces ?
>
> When cloning we can walk the parent pid->pid_nrs list and duplicate
> them for the child struct pid. If CLONE_NEWPID is set, then we would
> allocate one more, just for the child. That should give us all our
> ancestor pid namespaces. no ?

Sound sane to me, at least as long as the entries are well ordered
on that list.

You have missed so many little cases that it is hard for me to tell
looking at various patches if you have covered various bits correctly
or not.

Going down (if not up) may be one of those things that comes up in
kill_something_info when we send signals to the list of all processes,
in a pid namespace.

By the time we have covered all of the missing little bits it wouldn't
surprise me if the choice of data structures changed noticeably, and
we need to get all of the bits in the kernel core before we can seriously
think about using this code anywhere.

Eric



More information about the Containers mailing list