Skip to contentSkip to conversation

fix XENMEM_remove_from_physmap return value

PATCH In review Jan Beulich 3 participants 3 messages Jan 15, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix XENMEM_remove_from_physmap return value

A random value is being returned as of c/s 26350:ba386fd2bf17 in the success case.

xen/common/memory.c +3 -2
@@ -687,10 +687,11 @@ long do_memory_op(unsigned long cmd, XEN
         if ( d == NULL )
             return -ESRCH;
 
-        if ( xsm_remove_from_physmap(XSM_TARGET, current->domain, d) )
+        rc = xsm_remove_from_physmap(XSM_TARGET, current->domain, d);
+        if ( rc )
         {
             rcu_unlock_domain(d);
-            return -EPERM;
+            return rc;
         }
 
         domain_lock(d);

fix XENMEM_remove_from_physmap return value

A random value is being returned as of c/s 26350:ba386fd2bf17 in the success case.

xen/common/memory.c +3 -2
@@ -687,10 +687,11 @@ long do_memory_op(unsigned long cmd, XEN
         if ( d == NULL )
             return -ESRCH;
 
-        if ( xsm_remove_from_physmap(XSM_TARGET, current->domain, d) )
+        rc = xsm_remove_from_physmap(XSM_TARGET, current->domain, d);
+        if ( rc )
         {
             rcu_unlock_domain(d);
-            return -EPERM;
+            return rc;
         }
 
         domain_lock(d);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel