Skip to content

Commit

Permalink
h8300: switch to generic sigaltstack
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Feb 3, 2013
1 parent 0aa0203 commit 6bc43c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
1 change: 1 addition & 0 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config H8300
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK

config SYMBOL_PREFIX
string
Expand Down
15 changes: 2 additions & 13 deletions arch/h8300/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@ sys_sigaction(int sig, const struct old_sigaction *act,
return ret;
}

asmlinkage int
sys_sigaltstack(const stack_t *uss, stack_t *uoss)
{
return do_sigaltstack(uss, uoss, rdusp());
}


/*
* Do a signal return; undo the signal stack.
*
Expand Down Expand Up @@ -212,7 +205,7 @@ asmlinkage int do_rt_sigreturn(unsigned long __unused,...)
if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &er0))
goto badframe;

if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT)
if (restore_altstack(&frame->uc.uc_stack))
goto badframe;

return er0;
Expand Down Expand Up @@ -358,11 +351,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(0, &frame->uc.uc_link);
err |= __put_user((void *)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 |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));
if (err)
Expand Down

0 comments on commit 6bc43c9

Please sign in to comment.