[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/mmuext: Unify okay/rc error handling in do_mmuext_op()



On 12/21/2015 12:16 PM, Andrew Cooper wrote:
c/s 506db90 "x86/HVM: merge HVM and PVH hypercall tables" introduced a path
whereby 'okay' was used uninitialised, with broke compilation on CentOS 7.

Splitting the error handling like this is fragile and unnecessary.  Drop the
okay variable entirely and just use rc directly, substituting rc = -EINVAL/0
for okay = 0/1.

In addition, two error messages are updated to print rc, and some stray
whitespace is dropped.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>

with a couple of style nits:

@@ -3258,14 +3254,14 @@ long do_mmuext_op(
break;
          }
-
+
          case MMUEXT_TLB_FLUSH_LOCAL:
              if ( likely(d == pg_owner) )
                  flush_tlb_local();
              else
                  rc = -EPERM;
              break;
-
+
          case MMUEXT_INVLPG_LOCAL:
              if ( unlikely(d != pg_owner) )
                  rc = -EPERM;

These look like stray changes.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.