um: ->restart_block.fn needs to be reset on sigreturn
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Apr 2012 07:27:28 +0000 (03:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 21 May 2012 18:19:31 +0000 (14:19 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/um/kernel/signal.c
arch/x86/um/signal.c

index fb12f4c5e649f60e8ddd847f88fc7c72b5639d24..0dfcef92ec912e114fcec46962ebdbc1c63bc147 100644 (file)
@@ -29,9 +29,6 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
        unsigned long sp;
        int err;
 
-       /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
        /* Did we come from a system call? */
        if (PT_REGS_SYSCALL_NR(regs) >= 0) {
                /* If so, check system call restarting.. */
index 4883b9546016e90cb1643c763e3c5ba9ce8b4188..72eafa6c6a526e0364959d437a4ab6b3e28c0374 100644 (file)
@@ -156,6 +156,9 @@ static int copy_sc_from_user(struct pt_regs *regs,
        struct sigcontext sc;
        int err, pid;
 
+       /* Always make any pending restarted system calls return -EINTR */
+       current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
        err = copy_from_user(&sc, from, sizeof(sc));
        if (err)
                return err;