Skip to contentSkip to conversation

x86/signal changes for v3.1

GIT PULL Ingo Molnar 1 participant 1 message Jul 22, 2011 x86

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-signal-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-signal-for-linus

Thanks,

Ingo

------------------>
Oleg Nesterov (4):
x86, signals: Convert the IA32_EMULATION code to use set_current_blocked() x86, signals: Convert the X86_32 code to use set_current_blocked() x86, do_signal: Simplify the TS_RESTORE_SIGMASK logic
x86: Kill handle_signal()->set_fs()

 arch/x86/ia32/ia32_signal.c |   22 +++++++----------
 arch/x86/kernel/signal.c    |   56 +++++++++++++-----------------------------
 2 files changed, 27 insertions(+), 51 deletions(-)
arch/x86/ia32/ia32_signal.c +9 -13
index 588a7aa..6557769 100644
@@ -127,15 +127,17 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
 
 asmlinkage long sys32_sigsuspend(int history0, int history1, 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();
+
 	set_restore_sigmask();
 	return -ERESTARTNOHAND;
 }
@@ -279,10 +281,7 @@ asmlinkage long sys32_sigreturn(struct pt_regs *regs)
 		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 (ia32_restore_sigcontext(regs, &frame->sc, &ax))
 		goto badframe;
@@ -308,10 +307,7 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
 		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 (ia32_restore_sigcontext(regs, &frame->uc.uc_mcontext, &ax))
 		goto badframe;
arch/x86/kernel/signal.c +18 -38

125 lines not on this page · raw message