summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 03:06:03 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:00 -0500
commit08d4f65352f9464f1dd7d65d0bc27d57abf3d161 (patch)
treec1afd8b7156ccccfee26554826e12821ab746e92 /arch/m68k
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
downloadop-kernel-dev-08d4f65352f9464f1dd7d65d0bc27d57abf3d161.zip
op-kernel-dev-08d4f65352f9464f1dd7d65d0bc27d57abf3d161.tar.gz
m68k: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/Kconfig1
-rw-r--r--arch/m68k/kernel/signal.c16
2 files changed, 4 insertions, 13 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6710084..3e73dca7 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 9a396cd..41a34de4b 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));
OpenPOWER on IntegriCloud