From: Andrew Cooper Date: Fri, 25 Jul 2014 09:53:31 +0000 (+0200) Subject: x86/gdbsx: invert preconditions for XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4594 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=680d79f10bb70691a9ae3b4a6a8b669e0f2837f6;p=xen.git x86/gdbsx: invert preconditions for XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls c/s 3eb1c708ab "properly reference count DOMCTL_{,un}pausedomain hypercalls" accidentally inverted the use of d->controller_pause_count. Revert back to how it was originally, i.e. the XEN_DOMCTL_gdbsx_{,un}pausevcpu hypercalls are only valid for a domain already paused by the system controller. Reported-by: Jan Beulich Signed-off-by: Andrew Cooper --- diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index d62c715ca3..243f42ffa9 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1027,7 +1027,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || @@ -1043,7 +1043,7 @@ long arch_do_domctl( struct vcpu *v; ret = -EBUSY; - if ( d->controller_pause_count > 0 ) + if ( !d->controller_pause_count ) break; ret = -EINVAL; if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS ||