lkml.org 
[lkml]   [2011]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 31/41] um: Don't restore current->blocked on error
    On 08/11, Matt Fleming wrote:
    >
    > If we fail to setup the signal stack frame then we don't need to
    > restore current->blocked because it is not modified by
    > setup_signal_stack_*.

    Yes. And this is simply wrong if TIF_RESTORE_SIGMASK. We can block
    SIGSEGV which we need to dequeue.

    ACK

    > Cc: Oleg Nesterov <oleg@redhat.com>
    > Cc: Richard Weinberger <richard@nod.at>
    > Signed-off-by: Matt Fleming <matt.fleming@intel.com>
    > ---
    > arch/um/kernel/signal.c | 8 ++------
    > 1 files changed, 2 insertions(+), 6 deletions(-)
    >
    > diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
    > index 1812524..d177685 100644
    > --- a/arch/um/kernel/signal.c
    > +++ b/arch/um/kernel/signal.c
    > @@ -66,13 +66,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
    > #endif
    > err = setup_signal_stack_si(sp, signr, ka, regs, info, oldset);
    >
    > - if (err) {
    > - spin_lock_irq(&current->sighand->siglock);
    > - current->blocked = *oldset;
    > - recalc_sigpending();
    > - spin_unlock_irq(&current->sighand->siglock);
    > + if (err)
    > force_sigsegv(signr, current);
    > - } else {
    > + else {
    > sigset_t blocked:
    >
    > sigorsets(&blocked, &current->blocked, &ka->sa.sa_mask);
    > --
    > 1.7.4.4
    >



    \
     
     \ /
      Last update: 2011-08-16 19:43    [W:0.022 / U:3.420 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site