From: Ben Gras Date: Tue, 20 Jul 2010 17:13:44 +0000 (+0000) Subject: kernel: clear MF_CONTEXT_SET on kernel exit. X-Git-Tag: v3.1.8~179 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.html?a=commitdiff_plain;h=7f343ed5747a3877e08beedf2131ad4b35f5a031;p=minix.git kernel: clear MF_CONTEXT_SET on kernel exit. --- diff --git a/kernel/proc.c b/kernel/proc.c index f5f71a4fa..5db99af13 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -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