From: Keir Fraser Date: Wed, 1 Apr 2009 15:20:30 +0000 (+0100) Subject: x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13989^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d3a7711f0c72e302bdbc5a2a1f0fa2649a6b6858;p=xen.git x86: hvm_*io_intercept() should only update p->count if X86EMUL_OKAY. Signed-off-by: Stefano Stabellini Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/intercept.c b/xen/arch/x86/hvm/intercept.c index 107b87d2f7..1a1f24c7f6 100644 --- a/xen/arch/x86/hvm/intercept.c +++ b/xen/arch/x86/hvm/intercept.c @@ -100,8 +100,11 @@ static int hvm_mmio_access(struct vcpu *v, } } - if ( (p->count = i) != 0 ) + if ( i != 0 ) + { + p->count = i; rc = X86EMUL_OKAY; + } return rc; } @@ -165,8 +168,11 @@ static int process_portio_intercept(portio_action_t action, ioreq_t *p) } } - if ( (p->count = i) != 0 ) + if ( i != 0 ) + { + p->count = i; rc = X86EMUL_OKAY; + } return rc; }