aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/signal.c')
-rw-r--r--arch/parisc/kernel/signal.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 3790a3237172..537996955998 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -439,7 +439,7 @@ give_sigsegv:
439 * OK, we're invoking a handler. 439 * OK, we're invoking a handler.
440 */ 440 */
441 441
442static long 442static void
443handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, 443handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
444 struct pt_regs *regs, int in_syscall) 444 struct pt_regs *regs, int in_syscall)
445{ 445{
@@ -449,7 +449,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
449 449
450 /* Set up the stack frame */ 450 /* Set up the stack frame */
451 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall)) 451 if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
452 return 0; 452 return;
453 453
454 signal_delivered(sig, info, ka, regs, 454 signal_delivered(sig, info, ka, regs,
455 test_thread_flag(TIF_SINGLESTEP) || 455 test_thread_flag(TIF_SINGLESTEP) ||
@@ -457,8 +457,6 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
457 457
458 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n", 458 DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
459 regs->gr[28]); 459 regs->gr[28]);
460
461 return 1;
462} 460}
463 461
464static inline void 462static inline void
@@ -570,30 +568,17 @@ do_signal(struct pt_regs *regs, long in_syscall)
570 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n", 568 DBG(1,"\ndo_signal: regs=0x%p, sr7 %#lx, in_syscall=%d\n",
571 regs, regs->sr[7], in_syscall); 569 regs, regs->sr[7], in_syscall);
572 570
573 /* Everyone else checks to see if they are in kernel mode at 571 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
574 this point and exits if that's the case. I'm not sure why 572 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
575 we would be called in that case, but for some reason we
576 are. */
577
578 /* May need to force signal if handle_signal failed to deliver */
579 while (1) {
580 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
581 DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]);
582 573
583 if (signr <= 0) 574 if (signr > 0) {
584 break;
585
586 /* Restart a system call if necessary. */ 575 /* Restart a system call if necessary. */
587 if (in_syscall) 576 if (in_syscall)
588 syscall_restart(regs, &ka); 577 syscall_restart(regs, &ka);
589 578
590 /* Whee! Actually deliver the signal. If the 579 handle_signal(signr, &info, &ka, regs, in_syscall);
591 delivery failed, we need to continue to iterate in 580 return;
592 this loop so we can deliver the SIGSEGV... */
593 if (handle_signal(signr, &info, &ka, regs, in_syscall))
594 return;
595 } 581 }
596 /* end of while(1) looping forever if we can't force a signal */
597 582
598 /* Did we come from a system call? */ 583 /* Did we come from a system call? */
599 if (in_syscall) 584 if (in_syscall)