diff options
-rw-r--r-- | arch/x86/kernel/signal.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 40a24932a8a1..bf9345da380b 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c | |||
@@ -485,17 +485,18 @@ static int __setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
485 | asmlinkage int | 485 | asmlinkage int |
486 | sys_sigsuspend(int history0, int history1, old_sigset_t mask) | 486 | sys_sigsuspend(int history0, int history1, old_sigset_t mask) |
487 | { | 487 | { |
488 | mask &= _BLOCKABLE; | 488 | sigset_t blocked; |
489 | spin_lock_irq(¤t->sighand->siglock); | 489 | |
490 | current->saved_sigmask = current->blocked; | 490 | current->saved_sigmask = current->blocked; |
491 | siginitset(¤t->blocked, mask); | 491 | |
492 | recalc_sigpending(); | 492 | mask &= _BLOCKABLE; |
493 | spin_unlock_irq(¤t->sighand->siglock); | 493 | siginitset(&blocked, mask); |
494 | set_current_blocked(&blocked); | ||
494 | 495 | ||
495 | current->state = TASK_INTERRUPTIBLE; | 496 | current->state = TASK_INTERRUPTIBLE; |
496 | schedule(); | 497 | schedule(); |
497 | set_restore_sigmask(); | ||
498 | 498 | ||
499 | set_restore_sigmask(); | ||
499 | return -ERESTARTNOHAND; | 500 | return -ERESTARTNOHAND; |
500 | } | 501 | } |
501 | 502 | ||
@@ -572,10 +573,7 @@ unsigned long sys_sigreturn(struct pt_regs *regs) | |||
572 | goto badframe; | 573 | goto badframe; |
573 | 574 | ||
574 | sigdelsetmask(&set, ~_BLOCKABLE); | 575 | sigdelsetmask(&set, ~_BLOCKABLE); |
575 | spin_lock_irq(¤t->sighand->siglock); | 576 | set_current_blocked(&set); |
576 | current->blocked = set; | ||
577 | recalc_sigpending(); | ||
578 | spin_unlock_irq(¤t->sighand->siglock); | ||
579 | 577 | ||
580 | if (restore_sigcontext(regs, &frame->sc, &ax)) | 578 | if (restore_sigcontext(regs, &frame->sc, &ax)) |
581 | goto badframe; | 579 | goto badframe; |