aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:04:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:04:32 -0400
commit805120795947008612ef64618bba8a6aa30cf88b (patch)
tree229acb76bfddb595f4d8b215637e12d911c1727d /arch/x86/ia32
parent9e39264ed4f687251632c0a6f4a70c2e51719662 (diff)
parent73d382deccac186d103496bf10388bc2432a8384 (diff)
Merge branch 'x86-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-signal-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: Kill handle_signal()->set_fs() x86, do_signal: Simplify the TS_RESTORE_SIGMASK logic x86, signals: Convert the X86_32 code to use set_current_blocked() x86, signals: Convert the IA32_EMULATION code to use set_current_blocked()
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32_signal.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 588a7aa937e1..65577698cab2 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -127,15 +127,17 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
127 127
128asmlinkage long sys32_sigsuspend(int history0, int history1, old_sigset_t mask) 128asmlinkage long sys32_sigsuspend(int history0, int history1, old_sigset_t mask)
129{ 129{
130 mask &= _BLOCKABLE; 130 sigset_t blocked;
131 spin_lock_irq(&current->sighand->siglock); 131
132 current->saved_sigmask = current->blocked; 132 current->saved_sigmask = current->blocked;
133 siginitset(&current->blocked, mask); 133
134 recalc_sigpending(); 134 mask &= _BLOCKABLE;
135 spin_unlock_irq(&current->sighand->siglock); 135 siginitset(&blocked, mask);
136 set_current_blocked(&blocked);
136 137
137 current->state = TASK_INTERRUPTIBLE; 138 current->state = TASK_INTERRUPTIBLE;
138 schedule(); 139 schedule();
140
139 set_restore_sigmask(); 141 set_restore_sigmask();
140 return -ERESTARTNOHAND; 142 return -ERESTARTNOHAND;
141} 143}
@@ -279,10 +281,7 @@ asmlinkage long sys32_sigreturn(struct pt_regs *regs)
279 goto badframe; 281 goto badframe;
280 282
281 sigdelsetmask(&set, ~_BLOCKABLE); 283 sigdelsetmask(&set, ~_BLOCKABLE);
282 spin_lock_irq(&current->sighand->siglock); 284 set_current_blocked(&set);
283 current->blocked = set;
284 recalc_sigpending();
285 spin_unlock_irq(&current->sighand->siglock);
286 285
287 if (ia32_restore_sigcontext(regs, &frame->sc, &ax)) 286 if (ia32_restore_sigcontext(regs, &frame->sc, &ax))
288 goto badframe; 287 goto badframe;
@@ -308,10 +307,7 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
308 goto badframe; 307 goto badframe;
309 308
310 sigdelsetmask(&set, ~_BLOCKABLE); 309 sigdelsetmask(&set, ~_BLOCKABLE);
311 spin_lock_irq(&current->sighand->siglock); 310 set_current_blocked(&set);
312 current->blocked = set;
313 recalc_sigpending();
314 spin_unlock_irq(&current->sighand->siglock);
315 311
316 if (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax)) 312 if (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax))
317 goto badframe; 313 goto badframe;