lkml.org 
[lkml]   [2019]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH] signal: remove the wrong signal_pending() check in restore_user_sigmask()
    Date
    From: Oleg Nesterov [mailto:oleg@redhat.com]
    > Sent: 05 June 2019 10:25
    > On 06/05, David Laight wrote:
    > >
    > > epoll() would have:
    > > if (restore_user_sigmask(xxx.sigmask, &sigsaved, !ret || ret == -EINTR))
    > > ret = -EINTR;
    >
    > I don't think so but lets discuss this later.

    I certainly think there should be some comments at least
    about when/whether signal handlers get called and that
    being separate from the return value.

    The system call restart stuff does seem strange.
    ISTR that was originally added for SIG_SUSPEND (^Z) so that those
    signals wouldn't be seen by the appication.
    But that makes it a property of the signal, not the system call.

    > > I also think it could be simplified if code that loaded the 'user sigmask'
    > > saved the old one in 'current->saved_sigmask' (and saved that it had done it).
    > > You'd not need 'sigsaved' nor pass the user sigmask address into
    > > the restore function.
    >
    > Heh. apparently you do not read my emails ;)
    >
    > This is what I proposed in my very 1st email, and I even showed the patch
    > and the code with the patch applied twice. Let me do this again.

    I did read that one, I've even quoted it in the past :-)
    It's just not been mentioned recently.

    David

    -
    Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
    Registration No: 1397386 (Wales)

    \
     
     \ /
      Last update: 2019-06-05 11:59    [W:2.298 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site