aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorCedric Le Goater <clg@fr.ibm.com>2006-01-06 00:19:10 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 08:33:49 -0800
commit4e3df37e7fb4e41bec84465ff31949737160ed58 (patch)
tree99860db17a34bd7f8ab18b97bf5f842141a749a7 /arch/s390
parenta63a4931c301a14ca79c41fec0b99d898dbba1fb (diff)
downloadkernel_samsung_aries-4e3df37e7fb4e41bec84465ff31949737160ed58.zip
kernel_samsung_aries-4e3df37e7fb4e41bec84465ff31949737160ed58.tar.gz
kernel_samsung_aries-4e3df37e7fb4e41bec84465ff31949737160ed58.tar.bz2
[PATCH] s390: rt_sigreturn fix
Check return code of do_sigaltstack and force a SIGSEGV if it is -EFAULT. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/compat_signal.c2
-rw-r--r--arch/s390/kernel/signal.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index 4ff6808..fa2b3bc 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -467,8 +467,6 @@ asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs)
if (err)
goto badframe;
- /* It is more difficult to avoid calling this function than to
- call it and ignore errors. */
set_fs (KERNEL_DS);
do_sigaltstack((stack_t __user *)&st, NULL, regs->gprs[15]);
set_fs (old_fs);
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index 6e0110d..13592d0 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -254,9 +254,9 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
if (restore_sigregs(regs, &frame->uc.uc_mcontext))
goto badframe;
- /* It is more difficult to avoid calling this function than to
- call it and ignore errors. */
- do_sigaltstack(&frame->uc.uc_stack, NULL, regs->gprs[15]);
+ if (do_sigaltstack(&frame->uc.uc_stack, NULL,
+ regs->gprs[15]) == -EFAULT)
+ goto badframe;
return regs->gprs[2];
badframe: