]> git.hungrycats.org Git - linux/commitdiff
ia64: From Linus: Always disable system call restart when invoking a
authorDavid Mosberger <davidm@wailua.hpl.hp.com>
Tue, 11 Nov 2003 15:14:26 +0000 (07:14 -0800)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Tue, 11 Nov 2003 15:14:26 +0000 (07:14 -0800)
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

index 8d94b0c0f0742018854e852f072045138c4aa5e5..8a5fe9796974867bd3d7b17a0d06d78a6c54b4e5 100644 (file)
@@ -559,10 +559,12 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
 
                ka = &current->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 */