Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Oleg Nesterov
On 07/26, Eric W. Biederman wrote: > > > Easy to fix, but perhaps we can simply add recalc_sigpending() into > > schedule_tail() ? It already does more than just finish_task_switch/etc. > > > > This way we do not need the new helper (which btw can only be used by > > copy_process). > > The problem

Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Oleg Nesterov
On 07/26, Eric W. Biederman wrote: > > > Easy to fix, but perhaps we can simply add recalc_sigpending() into > > schedule_tail() ? It already does more than just finish_task_switch/etc. > > > > This way we do not need the new helper (which btw can only be used by > > copy_process). > > The problem

Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Eric W. Biederman
Oleg Nesterov writes: > On 07/23, Eric W. Biederman wrote: >> >> --- a/kernel/fork.c >> +++ b/kernel/fork.c >> @@ -1988,6 +1988,7 @@ static __latent_entropy struct task_struct >> *copy_process( >>>signal->thread_head); >> } >>

Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Eric W. Biederman
Oleg Nesterov writes: > On 07/23, Eric W. Biederman wrote: >> >> --- a/kernel/fork.c >> +++ b/kernel/fork.c >> @@ -1988,6 +1988,7 @@ static __latent_entropy struct task_struct >> *copy_process( >>>signal->thread_head); >> } >>

Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Oleg Nesterov
On 07/23, Eric W. Biederman wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1988,6 +1988,7 @@ static __latent_entropy struct task_struct > *copy_process( > >signal->thread_head); > } > attach_pid(p, PIDTYPE_PID); > +

Re: [PATCH 18/20] signal: Add calculate_sigpending()

2018-07-26 Thread Oleg Nesterov
On 07/23, Eric W. Biederman wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1988,6 +1988,7 @@ static __latent_entropy struct task_struct > *copy_process( > >signal->thread_head); > } > attach_pid(p, PIDTYPE_PID); > +

[PATCH 18/20] signal: Add calculate_sigpending()

2018-07-23 Thread Eric W. Biederman
Add a function calculate_sigpending to test to see if any signals are pending for a new task immediately following fork. Signals have to happen either before or after fork. Today our practice is to push all of the signals to before the fork, but that has the downside that frequent or periodic

[PATCH 18/20] signal: Add calculate_sigpending()

2018-07-23 Thread Eric W. Biederman
Add a function calculate_sigpending to test to see if any signals are pending for a new task immediately following fork. Signals have to happen either before or after fork. Today our practice is to push all of the signals to before the fork, but that has the downside that frequent or periodic