From 4e3df37e7fb4e41bec84465ff31949737160ed58 Mon Sep 17 00:00:00 2001 From: Cedric Le Goater Date: Fri, 6 Jan 2006 00:19:10 -0800 Subject: [PATCH] s390: rt_sigreturn fix Check return code of do_sigaltstack and force a SIGSEGV if it is -EFAULT. Signed-off-by: Martin Schwidefsky Signed-off-by: Cedric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/s390/kernel/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/s390/kernel/signal.c') diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 6e0110d71191..13592d00a10f 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: -- cgit v1.2.3-59-g8ed1b