[RFC][PATCH 0/8][v2]: Enable multiple mounts of devpts

Cedric Le Goater clg at fr.ibm.com
Wed Sep 3 05:04:01 PDT 2008

Eric W. Biederman wrote:
> Cedric Le Goater <clg at fr.ibm.com> writes:
>> Hello Eric,
>> I've spent some time on the code and I'm facing some issues with the nsproxy 
>> API if we are to keep the mqueue namespace in nsproxy: 
>> 	int copy_namespaces(unsigned long flags, struct task_struct *tsk);
>> 	void exit_task_namespaces(struct task_struct *tsk);
>> 	void switch_task_namespaces(struct task_struct *tsk, struct nsproxy
>> *new);
>> 	void free_nsproxy(struct nsproxy *ns);
>> 	int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **,
>> 		struct fs_struct *);
>> nsproxy designed to work closely with the clone flags and it is not well
>> suited to be called elsewhere than clone/unshare.
> Right.
>> So I could either : 
>> (1) make a special case for the mqueue namespace and duplicate some code 
>>     to unshare it from ->get_sb() when the option 'newinstance' is used.
> This is probably the best option. 
> You should be able to just wrap create_new_namespaces(flags=0,...)
> to create a new one.
> And then actually perform the unshare.
> Which means in practice you will bump the ref count on
> mq_ns and then drop it and insert a new mq_ns pointer but overall
> that shouldn't be too bad.

Thanks for the comments, Eric. I should have something ready soon.

I'm currently reviewing the C/R patches that have been sent recently.


More information about the Containers mailing list