]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
um: pull interrupt_end() into userspace()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 23 May 2012 04:25:15 +0000 (00:25 -0400)
committerRichard Weinberger <richard@nod.at>
Wed, 1 Aug 2012 22:25:44 +0000 (00:25 +0200)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/process.c
arch/um/os-Linux/skas/process.c

index f19ca6152460c61a927794359d6ed7e131e531a0..57fc7028714a51af6fc19952d0947a913523ccec 100644 (file)
@@ -151,12 +151,10 @@ void new_thread_handler(void)
         * 0 if it just exits
         */
        n = run_kernel_thread(fn, arg, &current->thread.exec_buf);
-       if (n == 1) {
-               /* Handle any immediate reschedules or signals */
-               interrupt_end();
+       if (n == 1)
                userspace(&current->thread.regs.regs);
-       }
-       else do_exit(0);
+       else
+               do_exit(0);
 }
 
 /* Called magically, see new_thread_handler above */
@@ -175,9 +173,6 @@ void fork_handler(void)
 
        current->thread.prev_sched = NULL;
 
-       /* Handle any immediate reschedules or signals */
-       interrupt_end();
-
        userspace(&current->thread.regs.regs);
 }
 
index cd65727854eb607b54291e23f2708ccf02717b87..2687f1f3a709b06ce5661763a86a12d8ca488a12 100644 (file)
@@ -347,6 +347,9 @@ void userspace(struct uml_pt_regs *regs)
        /* To prevent races if using_sysemu changes under us.*/
        int local_using_sysemu;
 
+       /* Handle any immediate reschedules or signals */
+       interrupt_end();
+
        if (getitimer(ITIMER_VIRTUAL, &timer))
                printk(UM_KERN_ERR "Failed to get itimer, errno = %d\n", errno);
        nsecs = timer.it_value.tv_sec * UM_NSEC_PER_SEC +