Commit 4e3df37e authored by Cedric Le Goater's avatar Cedric Le Goater Committed by Linus Torvalds

[PATCH] s390: rt_sigreturn fix

Check return code of do_sigaltstack and force a SIGSEGV if it is -EFAULT.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarCedric Le Goater <clg@fr.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a63a4931
...@@ -467,8 +467,6 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) ...@@ -467,8 +467,6 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
if (err) if (err)
goto badframe; goto badframe;
/* It is more difficult to avoid calling this function than to
call it and ignore errors. */
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]); do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]);
set_fs (old_fs); set_fs (old_fs);
......
...@@ -254,9 +254,9 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) ...@@ -254,9 +254,9 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
if (restore_sigregs(regs, &frame->uc.uc_mcontext)) if (restore_sigregs(regs, &frame->uc.uc_mcontext))
goto badframe; goto badframe;
/* It is more difficult to avoid calling this function than to if (do_sigaltstack(&frame->uc.uc_stack, NULL,
call it and ignore errors. */ regs->gprs[15]) == -EFAULT)
do_sigaltstack(&frame->uc.uc_stack, NULL, regs->gprs[15]); goto badframe;
return regs->gprs[2]; return regs->gprs[2];
badframe: badframe:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment