From: Al Viro Date: Sun, 22 Apr 2012 07:27:28 +0000 (-0400) Subject: um: ->restart_block.fn needs to be reset on sigreturn X-Git-Tag: firefly_0821_release~3680^2~2811^2^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3b7d15bde54be81e3edd773724d85d20ae42a4da;p=firefly-linux-kernel-4.4.55.git um: ->restart_block.fn needs to be reset on sigreturn Signed-off-by: Al Viro --- diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c index fb12f4c5e649..0dfcef92ec91 100644 --- a/arch/um/kernel/signal.c +++ b/arch/um/kernel/signal.c @@ -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.. */ diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c index 4883b9546016..72eafa6c6a52 100644 --- a/arch/x86/um/signal.c +++ b/arch/x86/um/signal.c @@ -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;