aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/signal.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 0340224cf73c..d13e61ac18da 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -66,12 +66,13 @@ const unsigned long syscall_restart_code[2] = {
66 */ 66 */
67asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask) 67asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask)
68{ 68{
69 mask &= _BLOCKABLE; 69 sigset_t blocked;
70 spin_lock_irq(&current->sighand->siglock); 70
71 current->saved_sigmask = current->blocked; 71 current->saved_sigmask = current->blocked;
72 siginitset(&current->blocked, mask); 72
73 recalc_sigpending(); 73 mask &= _BLOCKABLE;
74 spin_unlock_irq(&current->sighand->siglock); 74 siginitset(&blocked, mask);
75 set_current_blocked(&blocked);
75 76
76 current->state = TASK_INTERRUPTIBLE; 77 current->state = TASK_INTERRUPTIBLE;
77 schedule(); 78 schedule();
@@ -281,10 +282,7 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
281 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); 282 err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
282 if (err == 0) { 283 if (err == 0) {
283 sigdelsetmask(&set, ~_BLOCKABLE); 284 sigdelsetmask(&set, ~_BLOCKABLE);
284 spin_lock_irq(&current->sighand->siglock); 285 set_current_blocked(&set);
285 current->blocked = set;
286 recalc_sigpending();
287 spin_unlock_irq(&current->sighand->siglock);
288 } 286 }
289 287
290 __get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err); 288 __get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err);
@@ -637,13 +635,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
637 /* 635 /*
638 * Block the signal if we were successful. 636 * Block the signal if we were successful.
639 */ 637 */
640 spin_lock_irq(&tsk->sighand->siglock); 638 block_sigmask(ka, sig);
641 sigorsets(&tsk->blocked, &tsk->blocked,
642 &ka->sa.sa_mask);
643 if (!(ka->sa.sa_flags & SA_NODEFER))
644 sigaddset(&tsk->blocked, sig);
645 recalc_sigpending();
646 spin_unlock_irq(&tsk->sighand->siglock);
647 639
648 return 0; 640 return 0;
649} 641}