]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: clear MF_CONTEXT_SET on kernel exit.
authorBen Gras <ben@minix3.org>
Tue, 20 Jul 2010 17:13:44 +0000 (17:13 +0000)
committerBen Gras <ben@minix3.org>
Tue, 20 Jul 2010 17:13:44 +0000 (17:13 +0000)
kernel/proc.c

index f5f71a4fad67386ab7fca72c21943367a9b1e568..5db99af13cd1342232af92d747c9e599a907af2e 100644 (file)
@@ -237,6 +237,12 @@ check_misc_flags:
                enable_fpu_exception();
        else
                disable_fpu_exception();
+
+       /* If MF_CONTEXT_SET is set, don't clobber process state within
+        * the kernel. The next kernel entry is OK again though.
+        */
+       proc_ptr->p_misc_flags &= ~MF_CONTEXT_SET;
+
        /*
         * restore_user_context() carries out the actual mode switch from kernel
         * to userspace. This function does not return