Re: [PATCH 2/2] exec: move core_pattern pipe helper into the crashing namespace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Oleg Nesterov
Date: Friday, September 17, 2010 - 6:29 pm

On 09/17, Will Drewry wrote:

Hmm... You mean, it won't visible in that namespace? Afacis, it should
have the correct pid in the init ns, no?

I am a bit worried task_active_pid_ns() != nsproxy->pid_ns, but perhaps
this is OK... Say, sys_getpid() returns 0, strange.


This looks overcomplicated to me, or I missed something.

I do not understand why should we do this beforehand, and why we need
copy_namespaces_unattached().

Can't you just pass current to umh_pipe_setup() (or another helper) as
the argument? Then this helper can copy ->fs and ->nsproxy itself.

In fact, I do not understand why create_new_namespaces() is used. It
is called with flags == 0 anyway, can't we just do

	ns = coredumping_task->nsproxy;
	get_nsproxy(ns);	
	switch_task_namespaces(current, ns);

?

Oleg.

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

Messages in current thread:
Re: [PATCH][RFC] fs/exec.c: provide the correct process pi ..., Eric W. Biederman, (Thu Sep 16, 1:12 pm)
[PATCH 1/2] nsproxy: add copy_namespaces_unattached, Will Drewry, (Fri Sep 17, 8:16 am)
Re: [PATCH 2/2] exec: move core_pattern pipe helper into t ..., Oleg Nesterov, (Fri Sep 17, 6:29 pm)
Re: [PATCH][RFC] v2 exec: move core_pattern pipe helper in ..., Eric W. Biederman, (Mon Sep 20, 11:34 am)