From: Corneliu ZUZU Date: Thu, 18 Feb 2016 14:08:25 +0000 (+0100) Subject: x86/hvm_event: fix uninitialized struct field usage introduced by c/s f5365e6 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1723 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8e0b74e02656c007455c12d0341a881aee8b13d2;p=xen.git x86/hvm_event: fix uninitialized struct field usage introduced by c/s f5365e6 c/s f5365e6: "xen/vm-events: Move parts of monitor_domctl code to common-side", introduced a use without initialization issue. hvm_event_breakpoint calls hvm_event_traps(&req) and if sync is true that ors some bits into req->flags which was never initialised. Reported by Coverity Scan. Initializes req @ hvm_event_breakpoint entry. Coverity-ID: 1353192 Signed-off-by: Corneliu ZUZU Acked-by: Razvan Cojocaru Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c index 874a36c119..cb9c152055 100644 --- a/xen/arch/x86/hvm/event.c +++ b/xen/arch/x86/hvm/event.c @@ -173,7 +173,7 @@ int hvm_event_breakpoint(unsigned long rip, { struct vcpu *curr = current; struct arch_domain *ad = &curr->domain->arch; - vm_event_request_t req; + vm_event_request_t req = {}; switch ( type ) {