diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-04-13 13:40:58 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-04-13 13:40:58 +0100 |
commit | 2bd42d61f1a6337e7fae6906c0001e44764c4b25 (patch) | |
tree | 366fdd5244421a6570a10718eca0a56af92ce994 /xen/common/sysctl.c | |
parent | 66ff9844c1e1eeeadddc2e51dbc5c57fa8671ea7 (diff) | |
download | xen-2bd42d61f1a6337e7fae6906c0001e44764c4b25.tar.gz xen-2bd42d61f1a6337e7fae6906c0001e44764c4b25.tar.bz2 xen-2bd42d61f1a6337e7fae6906c0001e44764c4b25.zip |
sysctl: Fix XEN_SYSCTL_debug_keys error path.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/sysctl.c')
-rw-r--r-- | xen/common/sysctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 1799eb3a94..ba16353266 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -169,12 +169,14 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl) 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; |