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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Friday, December 17, 2010 - 12:26 pm

Greg KH <greg@kroah.com> writes:


There is a very weird case for the data structures the initial task has
references to.  The initial task never goes away and so those data
structure never go away.  Furthermore we need many of those data
structures before we have a memory allocator ready.  So we statically
allocate a single data structure and up it's reference count to ensure
that the count never goes to zero.

There are also major benefits to have the version of something that is
never freed never going away, because it means you can just reference it
in code.  So while I would be happy to say this is special don't use a
kref and roll the reference counting logic by hand, we aren't
dynamically allocating init_uts_ns any time soon.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC 0/5] user namespaces: start clamping down, Serge E. Hallyn, (Fri Dec 17, 8:22 am)
[RFC 3/5] user namespaces: allow sethostname in a container, Serge E. Hallyn, (Fri Dec 17, 8:26 am)
Re: [RFC 1/5] user namespaces: Add a user_namespace as cre ..., Eric W. Biederman, (Fri Dec 17, 12:26 pm)
Re: [RFC 4/5] user namespaces: allow killing tasks in your ..., Eric W. Biederman, (Fri Dec 17, 12:31 pm)
Re: [RFC 5/5] user namespaces: Allow ptrace from non-init ..., Eric W. Biederman, (Fri Dec 17, 12:45 pm)
Re: [RFC 4/5] user namespaces: allow killing tasks in your ..., Eric W. Biederman, (Fri Dec 17, 1:17 pm)
Re: [RFC 1/5] user namespaces: Add a user_namespace as cre ..., Eric W. Biederman, (Fri Dec 17, 1:40 pm)
Re: [RFC 1/5] user namespaces: Add a user_namespace as cre ..., Eric W. Biederman, (Fri Dec 17, 11:32 pm)