aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r--arch/mips/kernel/signal32.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c
index 806ed073e54d..dbe821303125 100644
--- a/arch/mips/kernel/signal32.c
+++ b/arch/mips/kernel/signal32.c
@@ -769,9 +769,11 @@ give_sigsegv:
769 force_sigsegv(signr, current); 769 force_sigsegv(signr, current);
770} 770}
771 771
772static inline void handle_signal(unsigned long sig, siginfo_t *info, 772static inline int handle_signal(unsigned long sig, siginfo_t *info,
773 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs) 773 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs * regs)
774{ 774{
775 int ret;
776
775 switch (regs->regs[0]) { 777 switch (regs->regs[0]) {
776 case ERESTART_RESTARTBLOCK: 778 case ERESTART_RESTARTBLOCK:
777 case ERESTARTNOHAND: 779 case ERESTARTNOHAND:
@@ -791,9 +793,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
791 regs->regs[0] = 0; /* Don't deal with this again. */ 793 regs->regs[0] = 0; /* Don't deal with this again. */
792 794
793 if (ka->sa.sa_flags & SA_SIGINFO) 795 if (ka->sa.sa_flags & SA_SIGINFO)
794 current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info); 796 ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info);
795 else 797 else
796 current->thread.abi->setup_frame(ka, regs, sig, oldset); 798 ret = current->thread.abi->setup_frame(ka, regs, sig, oldset);
797 799
798 spin_lock_irq(&current->sighand->siglock); 800 spin_lock_irq(&current->sighand->siglock);
799 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); 801 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
@@ -801,6 +803,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
801 sigaddset(&current->blocked,sig); 803 sigaddset(&current->blocked,sig);
802 recalc_sigpending(); 804 recalc_sigpending();
803 spin_unlock_irq(&current->sighand->siglock); 805 spin_unlock_irq(&current->sighand->siglock);
806
807 return ret;
804} 808}
805 809
806int do_signal32(sigset_t *oldset, struct pt_regs *regs) 810int do_signal32(sigset_t *oldset, struct pt_regs *regs)
@@ -824,10 +828,8 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
824 oldset = &current->blocked; 828 oldset = &current->blocked;
825 829
826 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 830 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
827 if (signr > 0) { 831 if (signr > 0)
828 handle_signal(signr, &info, &ka, oldset, regs); 832 return handle_signal(signr, &info, &ka, oldset, regs);
829 return 1;
830 }
831 833
832no_signal: 834no_signal:
833 /* 835 /*