aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
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/parisc
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/parisc')
-rw-r--r--arch/parisc/kernel/signal.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 277cacadf653..441b25992846 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -443,8 +443,9 @@ give_sigsegv:
443 443
444static long 444static long
445handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, 445handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
446 sigset_t *oldset, struct pt_regs *regs, int in_syscall) 446 struct pt_regs *regs, int in_syscall)
447{ 447{
448 sigset_t *oldset = sigmask_to_save();
448 DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n", 449 DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n",
449 sig, ka, info, oldset, regs); 450 sig, ka, info, oldset, regs);
450 451
@@ -568,28 +569,17 @@ do_signal(struct pt_regs *regs, long in_syscall)
568 siginfo_t info; 569 siginfo_t info;
569 struct k_sigaction ka; 570 struct k_sigaction ka;
570 int signr; 571 int signr;
571 sigset_t *oldset;
572 572
573 DBG(1,"\ndo_signal: oldset=0x%p, regs=0x%p, sr7 %#lx, in_syscall=%d\n", 573 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n",
574 oldset, regs, regs->sr[7], in_syscall); 574 regs, regs->sr[7], in_syscall);
575 575
576 /* Everyone else checks to see if they are in kernel mode at 576 /* Everyone else checks to see if they are in kernel mode at
577 this point and exits if that's the case. I'm not sure why 577 this point and exits if that's the case. I'm not sure why
578 we would be called in that case, but for some reason we 578 we would be called in that case, but for some reason we
579 are. */ 579 are. */
580 580
581 if (test_thread_flag(TIF_RESTORE_SIGMASK))
582 oldset = &current->saved_sigmask;
583 else
584 oldset = &current->blocked;
585
586 DBG(1,"do_signal: oldset %08lx / %08lx\n",
587 oldset->sig[0], oldset->sig[1]);
588
589
590 /* May need to force signal if handle_signal failed to deliver */ 581 /* May need to force signal if handle_signal failed to deliver */
591 while (1) { 582 while (1) {
592
593 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 583 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
594 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); 584 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
595 585
@@ -603,8 +593,7 @@ do_signal(struct pt_regs *regs, long in_syscall)
603 /* Whee! Actually deliver the signal. If the 593 /* Whee! Actually deliver the signal. If the
604 delivery failed, we need to continue to iterate in 594 delivery failed, we need to continue to iterate in
605 this loop so we can deliver the SIGSEGV... */ 595 this loop so we can deliver the SIGSEGV... */
606 if (handle_signal(signr, &info, &ka, oldset, 596 if (handle_signal(signr, &info, &ka, regs, in_syscall)) {
607 regs, in_syscall)) {
608 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", 597 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
609 regs->gr[28]); 598 regs->gr[28]);
610 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 599 if (test_thread_flag(TIF_RESTORE_SIGMASK))