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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271355425 -3600
# Node ID 8a96f37e9826e8fd085fe27c04076b074a5453f1
# Parent  11010cf627c874fafcea2fff4dfa697658cdbeeb
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 11010cf627c8 -r 8a96f37e9826 xen/common/sysctl.c
--- a/xen/common/sysctl.c       Mon Apr 12 18:29:36 2010 +0100
+++ b/xen/common/sysctl.c       Thu Apr 15 19:17:05 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®.