From 8467576ac100e9c1c1bcd4fb98c87b7dd25a306a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 7 Dec 2011 20:18:07 -0800 Subject: [PATCH] kernel - Clear the quick-return flag when changing PSL_IOPL. * Make sure we do a full syscall return when changing PSL_IOPL. --- sys/platform/pc64/x86_64/sysarch.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/sys/platform/pc64/x86_64/sysarch.c b/sys/platform/pc64/x86_64/sysarch.c index c2a875b..cb8fd52 100644 --- a/sys/platform/pc64/x86_64/sysarch.c +++ b/sys/platform/pc64/x86_64/sysarch.c @@ -33,12 +33,15 @@ */ #include #include +#include #include #include #include #include #include +#include + int sys_sysarch(struct sysarch_args *uap) { @@ -49,6 +52,7 @@ int cpu_set_iopl(void) { curthread->td_lwp->lwp_md.md_regs->tf_rflags |= PSL_IOPL; + clear_quickret(); return(0); } @@ -56,6 +60,7 @@ int cpu_clr_iopl(void) { curthread->td_lwp->lwp_md.md_regs->tf_rflags &= ~PSL_IOPL; + clear_quickret(); return(0); } -- 1.7.7.2