From: Al Viro <viro@ftp.linux.org.uk>
To: linux-arch@vger.kernel.org
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] frv: double syscall restarts, syscall restart in sigreturn()
Date: Sat, 18 Sep 2010 20:42:15 +0100 [thread overview]
Message-ID: <E1Ox3Id-0006Ri-Bk@ZenIV.linux.org.uk> (raw)
we need to make sure that only the first do_signal() to be handled
on the way out syscall will bother with syscall restarts; additionally,
the check on the "signal has user handler" path had been wrong -
compare with restart prevention in sigreturn()...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
arch/frv/kernel/signal.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c
index ad74e2e..c2d331e 100644
--- a/arch/frv/kernel/signal.c
+++ b/arch/frv/kernel/signal.c
@@ -446,7 +446,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
int ret;
/* Are we from a system call? */
- if (in_syscall(__frame)) {
+ if (__frame->syscallno != -1) {
/* If so, check system call restarting.. */
switch (__frame->gr8) {
case -ERESTART_RESTARTBLOCK:
@@ -465,6 +465,7 @@ static int handle_signal(unsigned long sig, siginfo_t *info,
__frame->gr8 = __frame->orig_gr8;
__frame->pc -= 4;
}
+ __frame->syscallno = -1;
}
/* Set up the stack frame */
@@ -551,6 +552,7 @@ no_signal:
__frame->pc -= 4;
break;
}
+ __frame->syscallno = -1;
}
/* if there's no signal to deliver, we just put the saved sigmask
--
1.5.6.5
next reply other threads:[~2010-09-18 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-18 19:42 Al Viro [this message]
2010-09-20 14:13 [PATCH 1/5] frv: restart_block.fn needs to be reset on sigreturn David Howells
2010-09-20 14:13 ` [PATCH 5/5] frv: double syscall restarts, syscall restart in sigreturn() David Howells
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=E1Ox3Id-0006Ri-Bk@ZenIV.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=linux-arch@vger.kernel.org \
--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®