Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297600
b: refs/heads/master
c: 101d9b0
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Russell King committed Mar 24, 2012
1 parent 1331ff4 commit c8c6c82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e88443cdfc61af5cd22d6aeb245ee94833c473bc
refs/heads/master: 101d9b0dedbc9e560737d3357104bf09db48eb3e
24 changes: 8 additions & 16 deletions trunk/arch/arm/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ const unsigned long syscall_restart_code[2] = {
*/
asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask)
{
mask &= _BLOCKABLE;
spin_lock_irq(&current->sighand->siglock);
sigset_t blocked;

current->saved_sigmask = current->blocked;
siginitset(&current->blocked, mask);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);

mask &= _BLOCKABLE;
siginitset(&blocked, mask);
set_current_blocked(&blocked);

current->state = TASK_INTERRUPTIBLE;
schedule();
Expand Down Expand Up @@ -281,10 +282,7 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
if (err == 0) {
sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
set_current_blocked(&set);
}

__get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err);
Expand Down Expand Up @@ -637,13 +635,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
/*
* Block the signal if we were successful.
*/
spin_lock_irq(&tsk->sighand->siglock);
sigorsets(&tsk->blocked, &tsk->blocked,
&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&tsk->blocked, sig);
recalc_sigpending();
spin_unlock_irq(&tsk->sighand->siglock);
block_sigmask(ka, sig);

return 0;
}
Expand Down

0 comments on commit c8c6c82

Please sign in to comment.