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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cedric Le Goater <clg at fr.ibm.com> writes:

> Eric W. Biederman wrote:
>> 
>> What we don't have is a fast pid to namespace transfer. But that is just
>> an extra pointer in struct pid.  Really that is a trivial patch.
>> Giving every namespace a pid pointer in struct pid takes a little more
>> space then I would like but it is not a big deal.
>
> I'm not sure I understand how you want to do this. 
>
> 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.

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.

Eric


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux