lkml.org 
[lkml]   [2013]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] signals: eventpoll: set ->saved_sigmask at the start
    On 06/25, Oleg Nesterov wrote:
    >
    > On 06/25, Al Viro wrote:
    > >
    > > On Tue, Jun 25, 2013 at 09:57:59PM +0200, Oleg Nesterov wrote:
    > > > + if (error == -EINTR)
    > > > set_restore_sigmask();
    > > > - } else
    > > > - set_current_blocked(&sigsaved);
    > > > + else
    > > > + __set_current_blocked(&current->saved_sigmask);
    > >
    > > I don't like that. If anything, we have
    > > static inline void restore_saved_sigmask(void)
    > > {
    > > if (test_and_clear_restore_sigmask())
    > > __set_current_blocked(&current->saved_sigmask);
    > > }
    > > which means that the last part can be turned into
    > > set_restore_sigmask();
    > > if (error != -EINTR)
    > > restore_saved_sigmask();
    >
    > set_restore_sigmask() does WARN_ON(!TIF_SIGPENDING).

    But if we remove this WARN_ON() we can probably change
    set_restore_sigmask() to set TS_RESTORE_SIGMASK and
    do saved_mask = blocked.

    Perhaps it can even acccept "sigset_t *newmask" and do
    set_current_blocked().

    Then we can move it up and change the code above to simply as you
    suggested. But imho this needs a separate change.

    Oleg.



    \
     
     \ /
      Last update: 2013-06-25 23:21    [W:4.329 / U:0.464 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site