From 1b9ee80772ec8f950d412b9b979fb2cc3f91bedb Mon Sep 17 00:00:00 2001 From: David Mosberger Date: Tue, 11 Nov 2003 07:14:26 -0800 Subject: [PATCH] ia64: From Linus: Always disable system call restart when invoking a signal handler. Otherwise, a restarted system call that gets interrupted before the restart has taken effect by _another_ signal will potentially restart the wrong system call. --- arch/ia64/kernel/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c index 8d94b0c0f0742..8a5fe97969748 100644 --- a/arch/ia64/kernel/signal.c +++ b/arch/ia64/kernel/signal.c @@ -559,10 +559,12 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall) ka = ¤t->sighand->action[signr - 1]; + /* Always make any pending restarted system calls return -EINTR */ + current_thread_info()->restart_block.fn = do_no_restart_syscall; + if (restart) { switch (errno) { case ERESTART_RESTARTBLOCK: - current_thread_info()->restart_block.fn = do_no_restart_syscall; case ERESTARTNOHAND: scr->pt.r8 = ERR_CODE(EINTR); /* note: scr->pt.r10 is already -1 */ -- 2.53.0