OpenVZ Forum


Home » Mailing lists » Devel » [RFC] ns containers: namespace entering
Re: [RFC PATCH 3/4] namespace containers: add nsproxy to nscont struct [message #10226 is a reply to message #10224] Mon, 12 February 2007 23:27 Go to previous messageGo to previous message
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
On 2/12/07, Serge E. Hallyn <serue@us.ibm.com> wrote:
> --- a/kernel/container.c
> +++ b/kernel/container.c
> @@ -1581,6 +1581,14 @@ static void get_unused_name(char *buf) {
> sprintf(buf, "node%d", atomic_inc_return(&namecnt));
> }
>
> +/* XXX need to create include/linux/ns_container.h and move this there */
> +#ifdef CONFIG_CONTAINER_NS
> +void ns_set_nsproxy_from_task(struct container *cont, struct task_struct *tsk);
> +#else
> +static inline void
> +ns_set_nsproxy_from_task(struct container *cont, struct task_struct *tsk) { }
> +#endif
> +

Can't this just go in include/linux/nsproxy.h ?

>
> + /* mark the auto-created container with the new namespace list */
> + ns_set_nsproxy_from_task(child, tsk);
> +

This should be in ns_container_clone() or some (possibly new)
subsystem callback, rather than embedded in the generic containers
code.

Paul
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC PATCH 2/4] namespace containers: move nsproxy setting code
Next Topic: Alt+SysRq+K broken
Goto Forum:
  


Current Time: Sun Jul 27 14:22:02 GMT 2025

Total time taken to generate the page: 0.39070 seconds