[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH -mm 0/1] signal: simplify set_user_sigmask/restore_user_sigmask
From: Linus Torvalds
> Sent: 05 June 2019 18:25
> On Wed, Jun 5, 2019 at 8:58 AM Oleg Nesterov <> wrote:
> >
> > To simplify the review, please see the code with this patch applied.
> > I am using epoll_pwait() as an example because it looks very simple.
> I like it.
> However.
> I think I'd like it even more if we just said "we don't need
> restore_saved_sigmask AT ALL".
> Which would be fairly easy to do with something like the attached...

That would always call the signal handlers even when EINTR wasn't
being returned (which I think ought to happen ...).
The real purpose of restore_saved_sigmask() is to stop signal
handlers that are enabled by the temporary mask being called.

If a signal handler is called, I presume that the trampoline
calls back into the kernel to get further handlers called
and to finally restore the original signal mask?

What happens if a signal handler calls something that
would normally write to current->saved_sigmask?


Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
 \ /
  Last update: 2019-06-06 11:06    [W:0.174 / U:4.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site