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

[Xen-changelog] [xen-4.1-testing] xsm: Error code consistency



# HG changeset patch
# User Machon Gregory <mbgrego@xxxxxxxxxxxxxx>
# Date 1302186032 -3600
# Node ID bdb1fc99e5a98982b4bdf7ff49181a07728cf5f3
# Parent  dc8e2e30af632bb1d8216c0efce6efac489262b6
xsm: Error code consistency

Signed-off-by: Machon Gregory <mbgrego@xxxxxxxxxxxxxx>
xen-unstable changeset:   23140:967e1925775c
xen-unstable date:        Mon Apr 04 15:54:45 2011 +0100
---


diff -r dc8e2e30af63 -r bdb1fc99e5a9 xen/include/xsm/xsm.h
--- a/xen/include/xsm/xsm.h     Thu Apr 07 15:19:52 2011 +0100
+++ b/xen/include/xsm/xsm.h     Thu Apr 07 15:20:32 2011 +0100
@@ -427,7 +427,11 @@
 
 static inline long __do_xsm_op (XEN_GUEST_HANDLE(xsm_op_t) op)
 {
-    return xsm_call(__do_xsm_op(op));
+#ifdef XSM_ENABLE
+    return xsm_ops->__do_xsm_op(op);
+#else
+    return -ENOSYS;
+#endif
 }
 
 #ifdef XSM_ENABLE
diff -r dc8e2e30af63 -r bdb1fc99e5a9 xen/xsm/flask/flask_op.c
--- a/xen/xsm/flask/flask_op.c  Thu Apr 07 15:19:52 2011 +0100
+++ b/xen/xsm/flask/flask_op.c  Thu Apr 07 15:20:32 2011 +0100
@@ -485,6 +485,9 @@
     if ( length < 0 )
         goto out;
 
+    if ( len > count )
+        return -ERANGE; 
+
     memset(buf, 0, count);
     memcpy(buf, context, len);
     length = len;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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