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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271162458 -3600
# Node ID 859a372efa66e6bcba8e1fd968e521cb16da12ea
# Parent  da90dd1a09b93ae41ab451d223ff87dca04356f5
sysctl: Fix XEN_SYSCTL_debug_keys error path.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/sysctl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r da90dd1a09b9 -r 859a372efa66 xen/common/sysctl.c
--- a/xen/common/sysctl.c       Tue Apr 13 13:27:46 2010 +0100
+++ b/xen/common/sysctl.c       Tue Apr 13 13:40:58 2010 +0100
@@ -169,12 +169,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®.