aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/signal.c')
-rw-r--r--arch/sparc64/kernel/signal.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 203e87301005..fb13775b3682 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -289,9 +289,7 @@ void do_rt_sigreturn(struct pt_regs *regs)
289 struct rt_signal_frame __user *sf; 289 struct rt_signal_frame __user *sf;
290 unsigned long tpc, tnpc, tstate; 290 unsigned long tpc, tnpc, tstate;
291 __siginfo_fpu_t __user *fpu_save; 291 __siginfo_fpu_t __user *fpu_save;
292 mm_segment_t old_fs;
293 sigset_t set; 292 sigset_t set;
294 stack_t st;
295 int err; 293 int err;
296 294
297 /* Always make any pending restarted system calls return -EINTR */ 295 /* Always make any pending restarted system calls return -EINTR */
@@ -327,20 +325,13 @@ void do_rt_sigreturn(struct pt_regs *regs)
327 err |= restore_fpu_state(regs, &sf->fpu_state); 325 err |= restore_fpu_state(regs, &sf->fpu_state);
328 326
329 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t)); 327 err |= __copy_from_user(&set, &sf->mask, sizeof(sigset_t));
330 err |= __copy_from_user(&st, &sf->stack, sizeof(stack_t)); 328 err |= do_sigaltstack(&sf->stack, NULL, (unsigned long)sf);
331 329
332 if (err) 330 if (err)
333 goto segv; 331 goto segv;
334 332
335 regs->tpc = tpc; 333 regs->tpc = tpc;
336 regs->tnpc = tnpc; 334 regs->tnpc = tnpc;
337
338 /* It is more difficult to avoid calling this function than to
339 call it and ignore errors. */
340 old_fs = get_fs();
341 set_fs(KERNEL_DS);
342 do_sigaltstack((const stack_t __user *) &st, NULL, (unsigned long)sf);
343 set_fs(old_fs);
344 335
345 sigdelsetmask(&set, ~_BLOCKABLE); 336 sigdelsetmask(&set, ~_BLOCKABLE);
346 spin_lock_irq(&current->sighand->siglock); 337 spin_lock_irq(&current->sighand->siglock);