Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306031
b: refs/heads/master
c: 97c47bb
h: refs/heads/master
i:
  306029: 1b00fb7
  306027: 838dab7
  306023: a3a5633
  306015: f00308f
v: v3
  • Loading branch information
Matt Fleming authored and Al Viro committed May 22, 2012
1 parent 59389d6 commit dd9ecaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 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: 9ae36796020998fcd07431934be6b160e9c7bfce
refs/heads/master: 97c47bb70728c765d6cbf582759f9170fe152ded
33 changes: 9 additions & 24 deletions trunk/arch/h8300/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
asmlinkage int do_sigsuspend(struct pt_regs *regs)
{
old_sigset_t mask = regs->er3;
sigset_t saveset;
sigset_t saveset, blocked;

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

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

regs->er0 = -EINTR;
while (1) {
Expand All @@ -90,11 +89,8 @@ do_rt_sigsuspend(struct pt_regs *regs)
return -EFAULT;
sigdelsetmask(&newset, ~_BLOCKABLE);

spin_lock_irq(&current->sighand->siglock);
saveset = current->blocked;
current->blocked = newset;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
set_current_blocked(&newset);

regs->er0 = -EINTR;
while (1) {
Expand Down Expand Up @@ -232,10 +228,7 @@ asmlinkage int do_sigreturn(unsigned long __unused,...)
goto badframe;

sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sighand->siglock);
current->blocked = set;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
set_current_blocked(&set);

if (restore_sigcontext(regs, &frame->sc, &er0))
goto badframe;
Expand All @@ -260,10 +253,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused,...)
goto badframe;

sigdelsetmask(&set, ~_BLOCKABLE);
spin_unlock_irq(&current->sighand->siglock);
current->blocked = set;
recalc_sigpending();
spin_lock_irq(&current->sighand->siglock);
set_current_blocked(&set);

if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &er0))
goto badframe;
Expand Down Expand Up @@ -489,12 +479,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
else
setup_frame(sig, ka, oldset, regs);

spin_lock_irq(&current->sighand->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
if (!(ka->sa.sa_flags & SA_NODEFER))
sigaddset(&current->blocked,sig);
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
block_sigmask(ka, sig);
}

/*
Expand Down

0 comments on commit dd9ecaf

Please sign in to comment.