Messages in this thread Patch in this message | | | From | NIIBE Yutaka <> | Subject | [PATCH 2/4] signal/x86: do_signal: syscall restart should be done only once. | Date | Tue, 20 Mar 2018 11:38:55 +0900 |
| |
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
| |