From: Kevin Wolf <kwolf@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, patches@linaro.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block/vmdk: Report failures in vmdk_read_cid()
Date: Thu, 13 Jul 2017 14:09:21 +0200 [thread overview]
Message-ID: <20170713120921.GD4139@noname.redhat.com> (raw)
In-Reply-To: <20170710015824.GA7056@lemon.lan>
Am 10.07.2017 um 03:58 hat Fam Zheng geschrieben:
> On Sun, 07/09 18:06, Peter Maydell wrote:
> > The function vmdk_read_cid() can fail if the read on the underlying
> > block device fails, or if there's a format error in the VMDK file.
> > However its API doesn't provide a mechanism to report these errors,
> > and in some cases we were returning a CID of 0 and in some cases a
> > CID of 0xffffffff, either of which might potentially be valid values.
> >
> > Change the function to return 0 on success or a negative errno, and
> > return the CID via a uint32_t* argument. Update the callsites to
> > handle and propagate the error appropriately.
> >
> > This fixes in passing a Coverity-spotted issue (CID 1350038) where
> > we weren't checking the return value from sscanf().
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>
> Reviewed-by: Fam Zheng <famz@redhat.com>
Thanks, applied to the block branch.
Kevin
next prev parent reply other threads:[~2017-07-13 12:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 17:06 [Qemu-devel] [PATCH] block/vmdk: Report failures in vmdk_read_cid() Peter Maydell
2017-07-10 1:58 ` Fam Zheng
2017-07-13 12:09 ` Kevin Wolf [this message]
2017-07-28 12:54 ` Kevin Wolf
2018-01-19 11:35 ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2018-01-24 4:18 ` Fam Zheng
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=20170713120921.GD4139@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--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).