aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/signal.c')
-rw-r--r--arch/parisc/kernel/signal.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 537996955998..64d315f6d2a4 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -143,7 +143,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
143 goto give_sigsegv; 143 goto give_sigsegv;
144 DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n", 144 DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n",
145 usp, &compat_frame->uc.uc_stack); 145 usp, &compat_frame->uc.uc_stack);
146 if (do_sigaltstack32(&compat_frame->uc.uc_stack, NULL, usp) == -EFAULT) 146 if (compat_restore_altstack(&compat_frame->uc.uc_stack))
147 goto give_sigsegv; 147 goto give_sigsegv;
148 } else 148 } else
149#endif 149#endif
@@ -154,7 +154,7 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
154 goto give_sigsegv; 154 goto give_sigsegv;
155 DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n", 155 DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n",
156 usp, &frame->uc.uc_stack); 156 usp, &frame->uc.uc_stack);
157 if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT) 157 if (restore_altstack(&frame->uc.uc_stack))
158 goto give_sigsegv; 158 goto give_sigsegv;
159 } 159 }
160 160
@@ -260,15 +260,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
260 if (is_compat_task()) { 260 if (is_compat_task()) {
261 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info); 261 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info);
262 err |= copy_siginfo_to_user32(&compat_frame->info, info); 262 err |= copy_siginfo_to_user32(&compat_frame->info, info);
263 DBG(1,"SETUP_RT_FRAME: 1\n"); 263 err |= __compat_save_altstack( &compat_frame->uc.uc_stack, regs->gr[30]);
264 compat_val = (compat_int_t)current->sas_ss_sp;
265 err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_sp);
266 DBG(1,"SETUP_RT_FRAME: 2\n");
267 compat_val = (compat_int_t)current->sas_ss_size;
268 err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_size);
269 DBG(1,"SETUP_RT_FRAME: 3\n");
270 compat_val = sas_ss_flags(regs->gr[30]);
271 err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_flags);
272 DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &compat_frame->uc); 264 DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &compat_frame->uc);
273 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext); 265 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext);
274 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, 266 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext,
@@ -280,10 +272,7 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
280 { 272 {
281 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &frame->info); 273 DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &frame->info);
282 err |= copy_siginfo_to_user(&frame->info, info); 274 err |= copy_siginfo_to_user(&frame->info, info);
283 err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp); 275 err |= __save_altstack(&frame->uc.uc_stack, regs->gr[30]);
284 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
285 err |= __put_user(sas_ss_flags(regs->gr[30]),
286 &frame->uc.uc_stack.ss_flags);
287 DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc); 276 DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc);
288 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); 277 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext);
289 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); 278 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall);