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

[Xen-changelog] [xen-3.4-testing] sysctl: Fix XEN_SYSCTL_debug_keys error path.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271355660 -3600
# Node ID 5d67dff1d1f72453e60123ebdddde8936e255271
# Parent  c22a8bb2852aea31a02bdd7749a97d1c516c9087
sysctl: Fix XEN_SYSCTL_debug_keys error path.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   21160:859a372efa66
xen-unstable date:        Tue Apr 13 13:40:58 2010 +0100
---
 xen/common/sysctl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r c22a8bb2852a -r 5d67dff1d1f7 xen/common/sysctl.c
--- a/xen/common/sysctl.c       Wed Apr 14 15:57:53 2010 +0100
+++ b/xen/common/sysctl.c       Thu Apr 15 19:21:00 2010 +0100
@@ -154,12 +154,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
         if ( ret )
             break;
 
+        ret = -EFAULT;
         for ( i = 0; i < op->u.debug_keys.nr_keys; i++ )
         {
             if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) )
-                return -EFAULT;
+                goto out;
             handle_keypress(c, guest_cpu_user_regs());
         }
+        ret = 0;
     }
     break;
 

_______________________________________________
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®.