From: NIIBE Yutaka <gniibe@fsij.org>
To: linux-kernel@vger.kernel.org
Cc: NIIBE Yutaka <gniibe@fsij.org>
Subject: [PATCH v2 2/4] signal/x86: do_signal: syscall restart should be done only once.
Date: Thu, 22 Mar 2018 10:44:11 +0900 [thread overview]
Message-ID: <20180322014413.24099-3-gniibe@fsij.org> (raw)
In-Reply-To: <20180322014413.24099-1-gniibe@fsij.org>
do_signal may be called multiple times from exit_to_usermode_loop. In
those multiple calls, only the one should handle restarting the system
call.
When actually delivering a signal, make sure the register will not be
examined again as syscall errno by another call of do_signal.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
---
arch/x86/kernel/signal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index cdfb82031243..e709b54a01b8 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -729,6 +729,7 @@ handle_signal(struct ksignal *ksig, struct pt_regs *regs)
regs->ip -= 2;
break;
}
+ regs->orig_ax = -1;
}
/*
--
2.11.0
next prev parent reply other threads:[~2018-03-22 1:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 1:44 [PATCH v2 0/4] Fix no signal delivery at do_signal NIIBE Yutaka
2018-03-22 1:44 ` [PATCH v2 1/4] signal/x86: Factor out nosig handling NIIBE Yutaka
2018-03-22 1:44 ` NIIBE Yutaka [this message]
2018-03-22 1:44 ` [PATCH v2 3/4] signal/x86: Move restore_saved_sigmask() NIIBE Yutaka
2018-03-22 1:44 ` [PATCH v2 4/4] signal/x86: Move nosig handling at the end of exit_to_usermode_loop NIIBE Yutaka
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=20180322014413.24099-3-gniibe@fsij.org \
--to=gniibe@fsij.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®