aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/signal.c5
-rw-r--r--arch/mips/kernel/signal_n32.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 604f077bb5bf..5922342bca39 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -390,7 +390,6 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
390{ 390{
391 struct rt_sigframe __user *frame; 391 struct rt_sigframe __user *frame;
392 sigset_t set; 392 sigset_t set;
393 stack_t st;
394 int sig; 393 int sig;
395 394
396 frame = (struct rt_sigframe __user *) regs.regs[29]; 395 frame = (struct rt_sigframe __user *) regs.regs[29];
@@ -411,11 +410,9 @@ asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
411 else if (sig) 410 else if (sig)
412 force_sig(sig, current); 411 force_sig(sig, current);
413 412
414 if (__copy_from_user(&st, &frame->rs_uc.uc_stack, sizeof(st)))
415 goto badframe;
416 /* It is more difficult to avoid calling this function than to 413 /* It is more difficult to avoid calling this function than to
417 call it and ignore errors. */ 414 call it and ignore errors. */
418 do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); 415 do_sigaltstack(&frame->rs_uc.uc_stack, NULL, regs.regs[29]);
419 416
420 /* 417 /*
421 * Don't let your children do this ... 418 * Don't let your children do this ...
diff --git a/arch/mips/kernel/signal_n32.c b/arch/mips/kernel/signal_n32.c
index 2c5df818c65a..ee24d814d5b9 100644
--- a/arch/mips/kernel/signal_n32.c
+++ b/arch/mips/kernel/signal_n32.c
@@ -109,6 +109,7 @@ asmlinkage int sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
109asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs) 109asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
110{ 110{
111 struct rt_sigframe_n32 __user *frame; 111 struct rt_sigframe_n32 __user *frame;
112 mm_segment_t old_fs;
112 sigset_t set; 113 sigset_t set;
113 stack_t st; 114 stack_t st;
114 s32 sp; 115 s32 sp;
@@ -143,7 +144,11 @@ asmlinkage void sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)
143 144
144 /* It is more difficult to avoid calling this function than to 145 /* It is more difficult to avoid calling this function than to
145 call it and ignore errors. */ 146 call it and ignore errors. */
147 old_fs = get_fs();
148 set_fs(KERNEL_DS);
146 do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]); 149 do_sigaltstack((stack_t __user *)&st, NULL, regs.regs[29]);
150 set_fs(old_fs);
151
147 152
148 /* 153 /*
149 * Don't let your children do this ... 154 * Don't let your children do this ...