[Devel] Re: [patch -mm 08/17] nsproxy: add hashtable

Cedric Le Goater clg at fr.ibm.com
Thu Dec 14 05:17:47 PST 2006


>> Let me try : you would add a 'struct pid pid' field to all namespaces and
>> assign that 'pid' field  with the struct pid of the task creating the
>> namespace ?
> 
> Yes a struct pid *pid field, that we did the proper reference counting
> on.

sure.
 
> As for which pid to assign, that is a little trickier.  The struct pid
> of the task creating the namespace is the obvious choice and that will
> always work for clone.  For unshare that would only work if we added
> the restriction you can't unshare if someone already has used that pid
> for that kind of namespace.

clone will also be an issue if more than one namespace is unshared. Do 
you use the same 'struct pid*' for each namespace ? hmm, it feels also 
wrong.

having an id field in the namespace and using a bind_ns like syscall
to let the user assign whatever id he wants to, doesn't seem to be
such a bad idea.

C. 
_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers




More information about the Devel mailing list