Re: [PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Oleg Nesterov
On 01/30, Pavel Tikhomirov wrote: > > On 01/30/2017 03:51 PM, Oleg Nesterov wrote: > >>+ /* > >>+* Inherit has_child_subreaper flag under the same > >>+* tasklist_lock with adding child to the process tree > >>+* for prop

Re: [PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Pavel Tikhomirov
On 01/30/2017 03:51 PM, Oleg Nesterov wrote: On 01/27, Pavel Tikhomirov wrote: --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1725,6 +1725,8 @@ struct task_struct { struct signal_struct *signal; struct sighand_struct *sighand; + struct list_head csr_descend

Re: [PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Oleg Nesterov
On 01/27, Pavel Tikhomirov wrote: > > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -1725,6 +1725,8 @@ struct task_struct { > struct signal_struct *signal; > struct sighand_struct *sighand; > > + struct list_head csr_descendant; > + You forgot to remove this part

[PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-27 Thread Pavel Tikhomirov
If process forks some children when it has is_child_subreaper flag enabled they will inherit has_child_subreaper flag - first group, when is_child_subreaper is disabled forked children will not inherit it - second group. So child-subreaper does not reparent all his descendants when their parents di