From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Tim Deegan <tim@xen.org>, Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH] x86/shadow: fix uninitialized rc shadow_track_dirty_vram()
Date: Fri, 22 May 2015 08:41:48 +0100 [thread overview]
Message-ID: <555EDDBC.5030301@citrix.com> (raw)
In-Reply-To: <555EE8D2020000780007D03A@mail.emea.novell.com>
On 22/05/2015 07:29, Jan Beulich wrote:
> Commit bd1b4a71b3 ("x86/shadow: fix shadow_track_dirty_vram to work on
> hvm guests"), trying to mirror its HAP counterpart, deleted a couple of
> assignments to rc without making sure rc is initialized on all paths.
>
> Coverity ID: 1299410
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> --- a/xen/arch/x86/mm/shadow/common.c
> +++ b/xen/arch/x86/mm/shadow/common.c
> @@ -3518,7 +3518,7 @@ int shadow_track_dirty_vram(struct domain
> unsigned long nr,
> XEN_GUEST_HANDLE_64(uint8) guest_dirty_bitmap)
> {
> - int rc;
> + int rc = 0;
> unsigned long end_pfn = begin_pfn + nr;
> unsigned long dirty_size = (nr + 7) / 8;
> int flush_tlb = 0;
> @@ -3550,10 +3550,7 @@ int shadow_track_dirty_vram(struct domain
> }
>
> if ( !nr )
> - {
> - rc = 0;
> goto out;
> - }
>
> dirty_bitmap = vzalloc(dirty_size);
> if ( dirty_bitmap == NULL )
>
>
>
next prev parent reply other threads:[~2015-05-22 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 6:29 [PATCH] x86/shadow: fix uninitialized rc shadow_track_dirty_vram() Jan Beulich
2015-05-22 7:41 ` Andrew Cooper [this message]
2015-05-22 7:44 ` Tim Deegan
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=555EDDBC.5030301@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.