debuggers.hg

changeset 21206:859a372efa66

sysctl: Fix XEN_SYSCTL_debug_keys error path.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Apr 13 13:40:58 2010 +0100 (2010-04-13)
parents da90dd1a09b9
children 0bebb5fa4f05
files xen/common/sysctl.c
line diff
     1.1 --- a/xen/common/sysctl.c	Tue Apr 13 13:27:46 2010 +0100
     1.2 +++ b/xen/common/sysctl.c	Tue Apr 13 13:40:58 2010 +0100
     1.3 @@ -169,12 +169,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysc
     1.4          if ( ret )
     1.5              break;
     1.6  
     1.7 +        ret = -EFAULT;
     1.8          for ( i = 0; i < op->u.debug_keys.nr_keys; i++ )
     1.9          {
    1.10              if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) )
    1.11 -                return -EFAULT;
    1.12 +                goto out;
    1.13              handle_keypress(c, guest_cpu_user_regs());
    1.14          }
    1.15 +        ret = 0;
    1.16      }
    1.17      break;
    1.18