浏览代码

um: ->restart_block.fn needs to be reset on sigreturn

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 13 年之前
父节点
当前提交
3b7d15bde5
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 0 3
      arch/um/kernel/signal.c
  2. 3 0
      arch/x86/um/signal.c

+ 0 - 3
arch/um/kernel/signal.c

@@ -29,9 +29,6 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
 	unsigned long sp;
 	unsigned long sp;
 	int err;
 	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? */
 	/* Did we come from a system call? */
 	if (PT_REGS_SYSCALL_NR(regs) >= 0) {
 	if (PT_REGS_SYSCALL_NR(regs) >= 0) {
 		/* If so, check system call restarting.. */
 		/* If so, check system call restarting.. */

+ 3 - 0
arch/x86/um/signal.c

@@ -156,6 +156,9 @@ static int copy_sc_from_user(struct pt_regs *regs,
 	struct sigcontext sc;
 	struct sigcontext sc;
 	int err, pid;
 	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));
 	err = copy_from_user(&sc, from, sizeof(sc));
 	if (err)
 	if (err)
 		return err;
 		return err;