[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180322014413.24099-3-gniibe@fsij.org>
Date: Thu, 22 Mar 2018 10:44:11 +0900
From: NIIBE Yutaka <gniibe@...j.org>
To: linux-kernel@...r.kernel.org
Cc: NIIBE Yutaka <gniibe@...j.org>
Subject: [PATCH v2 2/4] signal/x86: do_signal: syscall restart should be done only once.
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@...j.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
Powered by blists - more mailing lists