From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: akpm@osdl.org, clg@fr.ibm.com, linux-kernel@vger.kernel.org
Subject: [patch 4/5] s390: rt_sigreturn fix.
Date: Mon, 21 Nov 2005 18:48:44 +0100 [thread overview]
Message-ID: <20051121174844.GD9638@skybase.boeblingen.de.ibm.com> (raw)
From: Cedric Le Goater <clg@fr.ibm.com>
[patch 4/5] 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>
---
arch/s390/kernel/compat_signal.c | 2 --
arch/s390/kernel/signal.c | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff -urpN linux-2.6/arch/s390/kernel/compat_signal.c linux-2.6-patched/arch/s390/kernel/compat_signal.c
--- linux-2.6/arch/s390/kernel/compat_signal.c 2005-10-28 02:02:08.000000000 +0200
+++ linux-2.6-patched/arch/s390/kernel/compat_signal.c 2005-11-21 18:40:07.000000000 +0100
@@ -467,8 +467,6 @@ asmlinkage long sys32_rt_sigreturn(struc
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 -urpN linux-2.6/arch/s390/kernel/signal.c linux-2.6-patched/arch/s390/kernel/signal.c
--- linux-2.6/arch/s390/kernel/signal.c 2005-10-28 02:02:08.000000000 +0200
+++ linux-2.6-patched/arch/s390/kernel/signal.c 2005-11-21 18:40:07.000000000 +0100
@@ -254,9 +254,9 @@ asmlinkage long sys_rt_sigreturn(struct
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:
reply other threads:[~2005-11-21 17:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051121174844.GD9638@skybase.boeblingen.de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=akpm@osdl.org \
--cc=clg@fr.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®