diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-23 03:26:46 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:08 -0500 |
commit | 7cce246557bf379ea271d91f257ce248362cc12d (patch) | |
tree | a3c6c9c6f590990cbb1b3b6671b8c5e3fd1ff55a /arch/powerpc/kernel/signal_64.c | |
parent | 0aa0203fb43f04714004b2c4ad33b858e240555d (diff) |
powerpc: switch to generic sigaltstack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel/signal_64.c')
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 1ca045d44324..807b5b1535e9 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -368,10 +368,8 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5, | |||
368 | if (restore_sigcontext(regs, NULL, 1, &uc->uc_mcontext)) | 368 | if (restore_sigcontext(regs, NULL, 1, &uc->uc_mcontext)) |
369 | goto badframe; | 369 | goto badframe; |
370 | 370 | ||
371 | /* do_sigaltstack expects a __user pointer and won't modify | 371 | if (restore_altstack(&uc->uc_stack)) |
372 | * what's in there anyway | 372 | goto badframe; |
373 | */ | ||
374 | do_sigaltstack(&uc->uc_stack, NULL, regs->gpr[1]); | ||
375 | 373 | ||
376 | set_thread_flag(TIF_RESTOREALL); | 374 | set_thread_flag(TIF_RESTOREALL); |
377 | return 0; | 375 | return 0; |
@@ -416,10 +414,7 @@ int handle_rt_signal64(int signr, struct k_sigaction *ka, siginfo_t *info, | |||
416 | /* Create the ucontext. */ | 414 | /* Create the ucontext. */ |
417 | err |= __put_user(0, &frame->uc.uc_flags); | 415 | err |= __put_user(0, &frame->uc.uc_flags); |
418 | err |= __put_user(0, &frame->uc.uc_link); | 416 | err |= __put_user(0, &frame->uc.uc_link); |
419 | err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); | 417 | err |= __save_altstack(&frame->uc.uc_stack, regs->gpr[1]); |
420 | err |= __put_user(sas_ss_flags(regs->gpr[1]), | ||
421 | &frame->uc.uc_stack.ss_flags); | ||
422 | err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); | ||
423 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, signr, NULL, | 418 | err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, signr, NULL, |
424 | (unsigned long)ka->sa.sa_handler, 1); | 419 | (unsigned long)ka->sa.sa_handler, 1); |
425 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); | 420 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); |