From: Stefan Hajnoczi <stefanha@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit
Date: Wed, 16 Jan 2013 13:53:34 +0100 [thread overview]
Message-ID: <20130116125334.GB8511@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <82f8ffaa908befab90470a79e0feb105af9aad84.1358264426.git.jcody@redhat.com>
On Tue, Jan 15, 2013 at 10:47:24AM -0500, Jeff Cody wrote:
> This is a bug that was caught by a coverity run by Markus. In
> the error case when we errored out to exit_restore_open early in the
> function, 'overlay_bs' was still NULL at that point, although it is
> used to look up flags and perform a bdrv_reopen().
>
> Move the overlay_bs lookup to where it is needed, and check for NULL
> before restoring the flags. Also get rid of the unneeded parameter
> initialization.
>
> Reported-By: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
> block/commit.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
prev parent reply other threads:[~2013-01-16 13:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 15:47 [Qemu-devel] [PATCH] block: fix null-pointer bug on error case in block commit Jeff Cody
2013-01-16 11:54 ` Markus Armbruster
2013-01-16 12:53 ` Stefan Hajnoczi [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=20130116125334.GB8511@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=armbru@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.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).