summaryrefslogtreecommitdiff
path: root/arch/unicore32/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 12:52:33 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-04 03:16:23 +0400
commit50b3c9e30a53172b627081e7129c03ef53f27319 (patch)
treedf6c605eb279c00ebf114f07b3ead4e8d690fbc0 /arch/unicore32/kernel
parent0aa0203fb43f04714004b2c4ad33b858e240555d (diff)
downloadlinux-50b3c9e30a53172b627081e7129c03ef53f27319.tar.xz
unicore32: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/unicore32/kernel')
-rw-r--r--arch/unicore32/kernel/entry.S5
-rw-r--r--arch/unicore32/kernel/signal.c12
2 files changed, 2 insertions, 15 deletions
diff --git a/arch/unicore32/kernel/entry.S b/arch/unicore32/kernel/entry.S
index 581630d91444..bcdedd80890e 100644
--- a/arch/unicore32/kernel/entry.S
+++ b/arch/unicore32/kernel/entry.S
@@ -674,11 +674,6 @@ ENTRY(sys_rt_sigreturn)
b __sys_rt_sigreturn
ENDPROC(sys_rt_sigreturn)
-ENTRY(sys_sigaltstack)
- ldw r2, [sp+], #S_OFF + S_SP
- b do_sigaltstack
-ENDPROC(sys_sigaltstack)
-
__INIT
/*
diff --git a/arch/unicore32/kernel/signal.c b/arch/unicore32/kernel/signal.c
index b8b2ffd774d6..6905f0ebdc77 100644
--- a/arch/unicore32/kernel/signal.c
+++ b/arch/unicore32/kernel/signal.c
@@ -123,8 +123,7 @@ asmlinkage int __sys_rt_sigreturn(struct pt_regs *regs)
if (restore_sigframe(regs, &frame->sig))
goto badframe;
- if (do_sigaltstack(&frame->sig.uc.uc_stack, NULL, regs->UCreg_sp)
- == -EFAULT)
+ if (restore_altstack(&frame->sig.uc.uc_stack))
goto badframe;
return regs->UCreg_00;
@@ -265,7 +264,6 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
{
struct rt_sigframe __user *frame =
get_sigframe(ka, regs, sizeof(*frame));
- stack_t stack;
int err = 0;
if (!frame)
@@ -275,13 +273,7 @@ static int setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
err |= __put_user(0, &frame->sig.uc.uc_flags);
err |= __put_user(NULL, &frame->sig.uc.uc_link);
-
- memset(&stack, 0, sizeof(stack));
- stack.ss_sp = (void __user *)current->sas_ss_sp;
- stack.ss_flags = sas_ss_flags(regs->UCreg_sp);
- stack.ss_size = current->sas_ss_size;
- err |= __copy_to_user(&frame->sig.uc.uc_stack, &stack, sizeof(stack));
-
+ err |= __save_altstack(&frame->sig.uc.uc_stack, regs->UCreg_sp);
err |= setup_sigframe(&frame->sig, regs, set);
if (err == 0)
err |= setup_return(regs, ka, frame->sig.retcode, frame, usig);