Skip to content

Commit

Permalink
frv: 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 fe76141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions arch/frv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ config FRV
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CPU_DEVICES
select ARCH_WANT_IPC_PARSE_VERSION
select GENERIC_SIGALTSTACK

config ZONE_DMA
bool
Expand Down
13 changes: 2 additions & 11 deletions arch/frv/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ asmlinkage int sys_sigaction(int sig,
return ret;
}

asmlinkage
int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
{
return do_sigaltstack(uss, uoss, __frame->sp);
}


/*
* Do a signal return; undo the signal stack.
*/
Expand Down Expand Up @@ -173,7 +166,7 @@ asmlinkage int sys_rt_sigreturn(void)
if (restore_sigcontext(&frame->uc.uc_mcontext, &gr8))
goto badframe;

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

return gr8;
Expand Down Expand Up @@ -345,9 +338,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
/* Create the ucontext. */
if (__put_user(0, &frame->uc.uc_flags) ||
__put_user(NULL, &frame->uc.uc_link) ||
__put_user((void __user *)current->sas_ss_sp, &frame->uc.uc_stack.ss_sp) ||
__put_user(sas_ss_flags(__frame->sp), &frame->uc.uc_stack.ss_flags) ||
__put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size))
__save_altstack(&frame->uc.uc_stack, __frame->sp))
goto give_sigsegv;

if (setup_sigcontext(&frame->uc.uc_mcontext, set->sig[0]))
Expand Down

0 comments on commit fe76141

Please sign in to comment.