lkml.org 
[lkml]   [2018]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 20/20] signal: Don't restart fork when signals come in.
On 07/24, Eric W. Biederman wrote:
>
> Similarly the current code will also miss blocked
> signals that are delivered to multiple process, as those signals will
> not appear pending during fork.

Well, I still think this needs a separate change and discussion...

Let me repeat, I simply do not know if this is good or not, I don't know
if the current behaviour is by design or it is mistake.

OK, I won't argue but note that your patch doesn't really fix the problem,

> + spin_lock_irq(&current->sighand->siglock);
> + if (!(clone_flags & CLONE_THREAD))
> + hlist_add_head(&delayed.node, &current->signal->multiprocess);
> + recalc_sigpending();
> + spin_unlock_irq(&current->sighand->siglock);
> + retval = -ERESTARTNOINTR;
> + if (signal_pending(current))
> + goto fork_out;

because recalc_sigpending() will not notice the blocked multiprocess signal
if it is already pending.

Oleg.

\
 
 \ /
  Last update: 2018-07-26 18:22    [W:1.063 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site