xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Corneliu ZUZU <czuzu@bitdefender.com>, xen-devel@lists.xen.org
Cc: Tamas K Lengyel <tamas@tklengyel.com>, Keir Fraser <keir@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>
Subject: Re: [PATCH] x86/hvm_event: fix uninitialized struct field usage introduced by c/s f5365e6
Date: Thu, 18 Feb 2016 10:50:43 +0000	[thread overview]
Message-ID: <56C5A203.7000807@citrix.com> (raw)
In-Reply-To: <1455792328-28855-1-git-send-email-czuzu@bitdefender.com>

On 18/02/16 10:45, Corneliu ZUZU wrote:
> 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 <czuzu@bitdefender.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  xen/arch/x86/hvm/event.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c
> index 874a36c..cb9c152 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 )
>      {

      parent reply	other threads:[~2016-02-18 10:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 10:45 [PATCH] x86/hvm_event: fix uninitialized struct field usage introduced by c/s f5365e6 Corneliu ZUZU
2016-02-18 10:47 ` Razvan Cojocaru
2016-02-18 14:10   ` Tamas K Lengyel
2016-02-18 14:16     ` Razvan Cojocaru
2016-02-18 14:18       ` Andrew Cooper
2016-02-18 15:37         ` Tamas K Lengyel
2016-02-18 10:50 ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C5A203.7000807@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=czuzu@bitdefender.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=rcojocaru@bitdefender.com \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).