diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-23 03:06:03 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:00 -0500 |
commit | 08d4f65352f9464f1dd7d65d0bc27d57abf3d161 (patch) | |
tree | c1afd8b7156ccccfee26554826e12821ab746e92 | |
parent | 0aa0203fb43f04714004b2c4ad33b858e240555d (diff) | |
download | linux-3.10-08d4f65352f9464f1dd7d65d0bc27d57abf3d161.tar.gz linux-3.10-08d4f65352f9464f1dd7d65d0bc27d57abf3d161.tar.bz2 linux-3.10-08d4f65352f9464f1dd7d65d0bc27d57abf3d161.zip |
m68k: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/m68k/Kconfig | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/signal.c | 16 |
2 files changed, 4 insertions, 13 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index 6710084e072..3e73dca7167 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@ -18,6 +18,7 @@ config M68K select HAVE_MOD_ARCH_SPECIFIC select MODULES_USE_ELF_REL select MODULES_USE_ELF_RELA + select GENERIC_SIGALTSTACK config RWSEM_GENERIC_SPINLOCK bool diff --git a/arch/m68k/kernel/signal.c b/arch/m68k/kernel/signal.c index 9a396cda314..41a34de4b4b 100644 --- a/arch/m68k/kernel/signal.c +++ b/arch/m68k/kernel/signal.c @@ -267,13 +267,6 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, return ret; } -asmlinkage int -sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) -{ - return do_sigaltstack(uss, uoss, rdusp()); -} - - /* * Do a signal return; undo the signal stack. * @@ -765,8 +758,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw, err |= __get_user(temp, &uc->uc_formatvec); err |= rt_restore_fpu_state(uc); + err |= restore_altstack(&uc->uc_stack); - if (err || do_sigaltstack(&uc->uc_stack, NULL, usp) == -EFAULT) + if (err) goto badframe; if (mangle_kernel_stack(regs, temp, &uc->uc_extra)) @@ -1014,11 +1008,7 @@ static int setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info, /* Create the ucontext. */ err |= __put_user(0, &frame->uc.uc_flags); err |= __put_user(NULL, &frame->uc.uc_link); - err |= __put_user((void __user *)current->sas_ss_sp, - &frame->uc.uc_stack.ss_sp); - err |= __put_user(sas_ss_flags(rdusp()), - &frame->uc.uc_stack.ss_flags); - err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); + err |= __save_altstack(&frame->uc.uc_stack, rdusp()); err |= rt_setup_ucontext(&frame->uc, regs); err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set)); |