aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/kernel/signal.c')
-rw-r--r--arch/m68k/kernel/signal.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c
index 973eec60cad4..710a528b928b 100644
--- a/arch/m68k/kernel/signal.c
+++ b/arch/m68k/kernel/signal.c
@@ -51,8 +51,6 @@
51#include <asm/traps.h> 51#include <asm/traps.h>
52#include <asm/ucontext.h> 52#include <asm/ucontext.h>
53 53
54#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
55
56#ifdef CONFIG_MMU 54#ifdef CONFIG_MMU
57 55
58/* 56/*
@@ -795,7 +793,6 @@ asmlinkage int do_sigreturn(unsigned long __unused)
795 sizeof(frame->extramask)))) 793 sizeof(frame->extramask))))
796 goto badframe; 794 goto badframe;
797 795
798 sigdelsetmask(&set, ~_BLOCKABLE);
799 set_current_blocked(&set); 796 set_current_blocked(&set);
800 797
801 if (restore_sigcontext(regs, &frame->sc, frame + 1)) 798 if (restore_sigcontext(regs, &frame->sc, frame + 1))
@@ -820,7 +817,6 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused)
820 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set))) 817 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
821 goto badframe; 818 goto badframe;
822 819
823 sigdelsetmask(&set, ~_BLOCKABLE);
824 set_current_blocked(&set); 820 set_current_blocked(&set);
825 821
826 if (rt_restore_ucontext(regs, sw, &frame->uc)) 822 if (rt_restore_ucontext(regs, sw, &frame->uc))
@@ -1123,8 +1119,9 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
1123 */ 1119 */
1124static void 1120static void
1125handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info, 1121handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
1126 sigset_t *oldset, struct pt_regs *regs) 1122 struct pt_regs *regs)
1127{ 1123{
1124 sigset_t *oldset = sigmask_to_save();
1128 int err; 1125 int err;
1129 /* are we from a system call? */ 1126 /* are we from a system call? */
1130 if (regs->orig_d0 >= 0) 1127 if (regs->orig_d0 >= 0)
@@ -1140,14 +1137,12 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
1140 if (err) 1137 if (err)
1141 return; 1138 return;
1142 1139
1143 block_sigmask(ka, sig); 1140 signal_delivered(sig, info, ka, regs, 0);
1144 1141
1145 if (test_thread_flag(TIF_DELAYED_TRACE)) { 1142 if (test_thread_flag(TIF_DELAYED_TRACE)) {
1146 regs->sr &= ~0x8000; 1143 regs->sr &= ~0x8000;
1147 send_sig(SIGTRAP, current, 1); 1144 send_sig(SIGTRAP, current, 1);
1148 } 1145 }
1149
1150 clear_thread_flag(TIF_RESTORE_SIGMASK);
1151} 1146}
1152 1147
1153/* 1148/*
@@ -1160,19 +1155,13 @@ static void do_signal(struct pt_regs *regs)
1160 siginfo_t info; 1155 siginfo_t info;
1161 struct k_sigaction ka; 1156 struct k_sigaction ka;
1162 int signr; 1157 int signr;
1163 sigset_t *oldset;
1164 1158
1165 current->thread.esp0 = (unsigned long) regs; 1159 current->thread.esp0 = (unsigned long) regs;
1166 1160
1167 if (test_thread_flag(TIF_RESTORE_SIGMASK))
1168 oldset = &current->saved_sigmask;
1169 else
1170 oldset = &current->blocked;
1171
1172 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 1161 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
1173 if (signr > 0) { 1162 if (signr > 0) {
1174 /* Whee! Actually deliver the signal. */ 1163 /* Whee! Actually deliver the signal. */
1175 handle_signal(signr, &ka, &info, oldset, regs); 1164 handle_signal(signr, &ka, &info, regs);
1176 return; 1165 return;
1177 } 1166 }
1178 1167
@@ -1182,10 +1171,7 @@ static void do_signal(struct pt_regs *regs)
1182 handle_restart(regs, NULL, 0); 1171 handle_restart(regs, NULL, 0);
1183 1172
1184 /* If there's no signal to deliver, we just restore the saved mask. */ 1173 /* If there's no signal to deliver, we just restore the saved mask. */
1185 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 1174 restore_saved_sigmask();
1186 clear_thread_flag(TIF_RESTORE_SIGMASK);
1187 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
1188 }
1189} 1175}
1190 1176
1191void do_notify_resume(struct pt_regs *regs) 1177void do_notify_resume(struct pt_regs *regs)