qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "M.Kustova" <maxa@catit.be>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Bug 1332297 <1332297@bugs.launchpad.net>
Subject: Re: [Qemu-devel] [Bug 1332297] Re: qemu-img: crash on check of an image with large value in the 'size' header field
Date: Wed, 25 Jun 2014 12:40:28 +0200	[thread overview]
Message-ID: <20140625104028.GC5581@noname.redhat.com> (raw)
In-Reply-To: <CALKf6DH_qU78X643Xdo9D77yKdcZzgNevLSGvWrJLoh2-Lg6PQ@mail.gmail.com>

Am 25.06.2014 um 11:54 hat M.Kustova geschrieben:
> On Wed, Jun 25, 2014 at 1:42 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> > Am 25.06.2014 um 11:32 hat M.Kustova geschrieben:
> >> On Tue, Jun 24, 2014 at 7:36 PM, Kevin Wolf <kwolf@redhat.com> wrote:
> >> > Am 24.06.2014 um 15:19 hat M.Kustova geschrieben:
> >> >> On Mon, Jun 23, 2014 at 12:02 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> >> >> > On Thu, Jun 19, 2014 at 07:19:55PM -0000, Maria Kustova wrote:
> >> >> >> The bug description missed qemu-img error:
> >> >> >>
> >> >> >> (process:12283): GLib-ERROR **: gmem.c:110: failed to allocate
> >> >> >> 18446744059294601304 bytes
> >> >> >
> >> >> > Thanks, there has been recent work by Kevin Wolf to handle memory
> >> >> > allocation failures gracefully without terminating QEMU.  This sounds
> >> >> > like a candidate for g_try_malloc() and friends.
> >> >> >
> >> >> > Does the following patch series solve the problem?
> >> >> > https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg01275.html
> >> >>
> >> >> These patches are conflicting with current master. So I can't test
> >> >> them as they are.
> >> >>
> >> >> Do you have a developer repository or branch containing these patches,
> >> >> so I could test it on the pre-release base?
> >> >
> >> > I'm just about to send a new version, I'll keep you CCed there.
> >>
> >> "[PATCH v4 21/21] qcow2: Return useful error code in refcount_init()"
> >> is still broken for the current master.
> >
> > In which way? I can cleanly apply the whole patch series on master (even
> > tried applying the emails from my inbox to be sure).
> 
> Beginning from line #49 in master:
> 
>     if (s->refcount_table_size > 0) {
>         BLKDBG_EVENT(bs->file, BLKDBG_REFTABLE_LOAD);
>         ret = bdrv_pread(bs->file, s->refcount_table_offset,
> 
> The patch:
> 
>    if (s->refcount_table_size > 0) {^M
>          if (s->refcount_table == NULL) {^M
> +            ret = -ENOMEM;^M
>              goto fail;^M
>          }^M
>          BLKDBG_EVENT(bs->file, BLKDBG_REFTABLE_LOAD);^M
>          ret = bdrv_pread(bs->file, s->refcount_table_offset,^M
> 
> At least master version doesn't have this condition.

It is code added in patch 11 of the same series.

Kevin

  reply	other threads:[~2014-06-25 10:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 19:13 [Qemu-devel] [Bug 1332297] [NEW] qemu-img: crash on check of an image with large value in the 'size' header field Maria Kustova
2014-06-19 19:19 ` [Qemu-devel] [Bug 1332297] " Maria Kustova
2014-06-23  8:02   ` Stefan Hajnoczi
2014-06-24 13:19     ` M.Kustova
2014-06-24 15:36       ` Kevin Wolf
2014-06-25  9:32         ` M.Kustova
2014-06-25  9:42           ` Kevin Wolf
2014-06-25  9:54             ` M.Kustova
2014-06-25 10:40               ` Kevin Wolf [this message]
2014-06-25 10:43                 ` M.Kustova
2014-06-25 13:30 ` Maria Kustova
2017-10-28 13:24 ` Thomas Huth
2017-12-28  4:17 ` Launchpad Bug Tracker
2018-01-31 11:48 ` michelkogan

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=20140625104028.GC5581@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=1332297@bugs.launchpad.net \
    --cc=maxa@catit.be \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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).