[Devel] Re: [RFC 1/5] user namespaces: Add a user_namespace as creator/owner of uts_namespace

Alexey Dobriyan adobriyan at gmail.com
Fri Dec 17 08:00:17 PST 2010


On Fri, Dec 17, 2010 at 5:56 PM, Alexey Dobriyan <adobriyan at gmail.com> wrote:
> On Fri, Dec 17, 2010 at 5:24 PM, Serge E. Hallyn <serge at hallyn.com> wrote:
>> +/*
>> + * userns count is 1 for root user, 1 for init_uts_ns,
>> + * and 1 for... ?
>> + */
>>  struct user_namespace init_user_ns = {
>>        .kref = {
>> -               .refcount       = ATOMIC_INIT(2),
>> +               .refcount       = ATOMIC_INIT(3),
>
> +1 is for init_nsproxy ;-)

Err, no.

+1 is to ensure it's never freed, but since allocator will BUG_ON (?) if fed
with static object, maybe it's completely bogus.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list