aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-02 09:59:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-06-01 12:58:48 -0400
commitb7f9a11a6cf1ea9ee6be3eb2b90d91327a09ad14 (patch)
tree7d5a5f469aea8ac2b3e1ab41e05a6abafcb2b694 /arch/mips/kernel/signal.c
parent51a7b448d4134e3e8eec633435e3e8faee14a828 (diff)
new helper: sigmask_to_save()
replace boilerplate "should we use ->saved_sigmask or ->blocked?" with calls of obvious inlined helper... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r--arch/mips/kernel/signal.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index aad2d2da5eec..18355060f241 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -515,8 +515,9 @@ struct mips_abi mips_abi = {
515}; 515};
516 516
517static int handle_signal(unsigned long sig, siginfo_t *info, 517static int handle_signal(unsigned long sig, siginfo_t *info,
518 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) 518 struct k_sigaction *ka, struct pt_regs *regs)
519{ 519{
520 sigset_t *oldset = sigmask_to_save();
520 int ret; 521 int ret;
521 struct mips_abi *abi = current->thread.abi; 522 struct mips_abi *abi = current->thread.abi;
522 void *vdso = current->mm->context.vdso; 523 void *vdso = current->mm->context.vdso;
@@ -560,7 +561,6 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
560static void do_signal(struct pt_regs *regs) 561static void do_signal(struct pt_regs *regs)
561{ 562{
562 struct k_sigaction ka; 563 struct k_sigaction ka;
563 sigset_t *oldset;
564 siginfo_t info; 564 siginfo_t info;
565 int signr; 565 int signr;
566 566
@@ -572,15 +572,10 @@ static void do_signal(struct pt_regs *regs)
572 if (!user_mode(regs)) 572 if (!user_mode(regs))
573 return; 573 return;
574 574
575 if (test_thread_flag(TIF_RESTORE_SIGMASK))
576 oldset = &current->saved_sigmask;
577 else
578 oldset = &current->blocked;
579
580 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 575 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
581 if (signr > 0) { 576 if (signr > 0) {
582 /* Whee! Actually deliver the signal. */ 577 /* Whee! Actually deliver the signal. */
583 if (handle_signal(signr, &info, &ka, oldset, regs) == 0) { 578 if (handle_signal(signr, &info, &ka, regs) == 0) {
584 /* 579 /*
585 * A signal was successfully delivered; the saved 580 * A signal was successfully delivered; the saved
586 * sigmask will have been stored in the signal frame, 581 * sigmask will have been stored in the signal frame,