[xen staging] x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()

patchbot
commit 48dbb2dbe9d9f92a2890a15bb48a0598c065b9f8
Author:     Andrew Cooper <[hidden email]>
AuthorDate: Wed Aug 1 12:47:50 2018 +0100
Commit:     Andrew Cooper <[hidden email]>
CommitDate: Thu Aug 2 10:10:43 2018 +0100

    x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()
   
    If the EPTP pointer can't be located in the altp2m list, the domain
    is (legitimately) crashed.
   
    Under those circumstances, execution will continue and guarentee to hit the
    BUG_ON(idx >= MAX_ALTP2M) (unfortunately, just out of context).
   
    Return from vmx_vmexit_handler() after the domain_crash(), which also has the
    side effect of reentering the scheduler more promptly.
   
    Signed-off-by: Andrew Cooper <[hidden email]>
    Reviewed-by: Razvan Cojocaru <[hidden email]>
    Acked-by: Kevin Tian <[hidden email]>
---
 xen/arch/x86/hvm/vmx/vmx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index bcf95f9a5f..257efbe322 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3666,6 +3666,8 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
             {
                 gdprintk(XENLOG_ERR, "EPTP not found in alternate p2m list\n");
                 domain_crash(v->domain);
+
+                return;
             }
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog