diff options
Diffstat (limited to 'arch/m68k/kernel/signal.c')
-rw-r--r-- | arch/m68k/kernel/signal.c | 59 |
1 files changed, 3 insertions, 56 deletions
diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 9a396cda3147..2a16df3d9312 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c | |||
@@ -225,56 +225,6 @@ static inline void push_cache(unsigned long vaddr) | |||
225 | #endif /* CONFIG_MMU */ | 225 | #endif /* CONFIG_MMU */ |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Atomically swap in the new signal mask, and wait for a signal. | ||
229 | */ | ||
230 | asmlinkage int | ||
231 | sys_sigsuspend(int unused0, int unused1, old_sigset_t mask) | ||
232 | { | ||
233 | sigset_t blocked; | ||
234 | siginitset(&blocked, mask); | ||
235 | return sigsuspend(&blocked); | ||
236 | } | ||
237 | |||
238 | asmlinkage int | ||
239 | sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
240 | struct old_sigaction __user *oact) | ||
241 | { | ||
242 | struct k_sigaction new_ka, old_ka; | ||
243 | int ret; | ||
244 | |||
245 | if (act) { | ||
246 | old_sigset_t mask; | ||
247 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | ||
248 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | ||
249 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || | ||
250 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
251 | __get_user(mask, &act->sa_mask)) | ||
252 | return -EFAULT; | ||
253 | siginitset(&new_ka.sa.sa_mask, mask); | ||
254 | } | ||
255 | |||
256 | ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL); | ||
257 | |||
258 | if (!ret && oact) { | ||
259 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | ||
260 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | ||
261 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || | ||
262 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
263 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
264 | return -EFAULT; | ||
265 | } | ||
266 | |||
267 | return ret; | ||
268 | } | ||
269 | |||
270 | asmlinkage int | ||
271 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) | ||
272 | { | ||
273 | return do_sigaltstack(uss, uoss, rdusp()); | ||
274 | } | ||
275 | |||
276 | |||
277 | /* | ||
278 | * Do a signal return; undo the signal stack. | 228 | * Do a signal return; undo the signal stack. |
279 | * | 229 | * |
280 | * Keep the return code on the stack quadword aligned! | 230 | * Keep the return code on the stack quadword aligned! |
@@ -765,8 +715,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, | |||
765 | err |= __get_user(temp, &uc->uc_formatvec); | 715 | err |= __get_user(temp, &uc->uc_formatvec); |
766 | 716 | ||
767 | err |= rt_restore_fpu_state(uc); | 717 | err |= rt_restore_fpu_state(uc); |
718 | err |= restore_altstack(&uc->uc_stack); | ||
768 | 719 | ||
769 | if (err || do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT) | 720 | if (err) |
770 | goto badframe; | 721 | goto badframe; |
771 | 722 | ||
772 | if (mangle_kernel_stack(regs, temp, &uc->uc_extra)) | 723 | if (mangle_kernel_stack(regs, temp, &uc->uc_extra)) |
@@ -1014,11 +965,7 @@ static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, | |||
1014 | /* Create the ucontext. */ | 965 | /* Create the ucontext. */ |
1015 | err |= __put_user(0, &frame->uc.uc_flags); | 966 | err |= __put_user(0, &frame->uc.uc_flags); |
1016 | err |= __put_user(NULL, &frame->uc.uc_link); | 967 | err |= __put_user(NULL, &frame->uc.uc_link); |
1017 | err |= __put_user((void __user *)current->sas_ss_sp, | 968 | err |= __save_altstack(&frame->uc.uc_stack, rdusp()); |
1018 | &frame->uc.uc_stack.ss_sp); | ||
1019 | err |= __put_user(sas_ss_flags(rdusp()), | ||
1020 | &frame->uc.uc_stack.ss_flags); | ||
1021 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
1022 | err |= rt_setup_ucontext(&frame->uc, regs); | 969 | err |= rt_setup_ucontext(&frame->uc, regs); |
1023 | err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); | 970 | err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); |
1024 | 971 | ||