Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-25 Thread Oleg Nesterov
forgot to mention... On 11/25, Oleg Nesterov wrote: > > On 11/24, Eric W. Biederman wrote: > > > > - We won't wait for an injected process in a pid namespace, > > or a processes debugged with gdb to be reaped before the pid > > init process exits if we don't wait. > > Yes, and I do not see

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-25 Thread Oleg Nesterov
On 11/24, Eric W. Biederman wrote: > > Oleg Nesterov writes: > > > The comments in zap_pid_ns_processes() are simply wrong, we need > > to explain how this code actually works. > > > > 1. "Ignore SIGCHLD" looks like optimization but it is not, we also > >need this for correctness. > > > > 2.

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-25 Thread Oleg Nesterov
On 11/24, Eric W. Biederman wrote: Oleg Nesterov o...@redhat.com writes: The comments in zap_pid_ns_processes() are simply wrong, we need to explain how this code actually works. 1. Ignore SIGCHLD looks like optimization but it is not, we also need this for correctness. 2. The

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-25 Thread Oleg Nesterov
forgot to mention... On 11/25, Oleg Nesterov wrote: On 11/24, Eric W. Biederman wrote: - We won't wait for an injected process in a pid namespace, or a processes debugged with gdb to be reaped before the pid init process exits if we don't wait. Yes, and I do not see why this is

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Eric W. Biederman
Oleg Nesterov writes: > The comments in zap_pid_ns_processes() are simply wrong, we need > to explain how this code actually works. > > 1. "Ignore SIGCHLD" looks like optimization but it is not, we also >need this for correctness. > > 2. The comment above sys_wait4() could be more clear. > >

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Oleg Nesterov
On 11/24, Oleg Nesterov wrote: > > + * sys_wait4() above can't reap the TASK_DEAD children but we do not > + * really care, we could reparent them to the global init. We could > + * exit and reap ->child_reaper even if it is not the last thread in > + * this pid_ns,

[PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Oleg Nesterov
The comments in zap_pid_ns_processes() are simply wrong, we need to explain how this code actually works. 1. "Ignore SIGCHLD" looks like optimization but it is not, we also need this for correctness. 2. The comment above sys_wait4() could be more clear. 3. The comment about TASK_DEAD

[PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Oleg Nesterov
The comments in zap_pid_ns_processes() are simply wrong, we need to explain how this code actually works. 1. Ignore SIGCHLD looks like optimization but it is not, we also need this for correctness. 2. The comment above sys_wait4() could be more clear. 3. The comment about TASK_DEAD children

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Oleg Nesterov
On 11/24, Oleg Nesterov wrote: + * sys_wait4() above can't reap the TASK_DEAD children but we do not + * really care, we could reparent them to the global init. We could + * exit and reap -child_reaper even if it is not the last thread in + * this pid_ns,

Re: [PATCH 1/2] exit: reparent: fix/update the comments in zap_pid_ns_processes()

2014-11-24 Thread Eric W. Biederman
Oleg Nesterov o...@redhat.com writes: The comments in zap_pid_ns_processes() are simply wrong, we need to explain how this code actually works. 1. Ignore SIGCHLD looks like optimization but it is not, we also need this for correctness. 2. The comment above sys_wait4() could be more