]> xenbits.xensource.com Git - xen.git/commitdiff
x86/hvm: don't let domains call HVMOP_set_mem_type on themselves.
authorTim Deegan <Tim.Deegan@citrix.com>
Wed, 9 Feb 2011 09:02:12 +0000 (09:02 +0000)
committerTim Deegan <Tim.Deegan@citrix.com>
Wed, 9 Feb 2011 09:02:12 +0000 (09:02 +0000)
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   22879:098c8a6483c9
xen-unstable date:        Mon Feb 07 09:39:59 2011 +0000

xen/arch/x86/hvm/hvm.c

index 6f0ee01adcef6a551b9dec10d952e984eb2df52d..4be6bcd81466cef11d8823c397b77bb3ddb4f6e4 100644 (file)
@@ -3041,6 +3041,10 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
         if ( rc != 0 )
             return rc;
 
+        rc = -EPERM;
+        if ( d == current->domain )
+            goto param_fail4;
+
         rc = -EINVAL;
         if ( !is_hvm_domain(d) )
             goto param_fail4;