qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
	Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: fix memory leak in early exit
Date: Fri, 16 Oct 2015 07:31:58 -0400	[thread overview]
Message-ID: <20151016113158.GB3695@localhost.localdomain> (raw)
In-Reply-To: <20151016083717.GC7432@stefanha-thinkpad.redhat.com>

On Fri, Oct 16, 2015 at 10:37:17AM +0200, Stefan Hajnoczi wrote:
> On Fri, Oct 16, 2015 at 08:58:12AM +0200, Alberto Garcia wrote:
> > On Thu 15 Oct 2015 05:54:27 PM CEST, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > > The stream block job has two early exit code paths.  They do not free
> > > s->backing_file_str.
> > >
> > > Also, the early exits rely on the fact that the coroutine hasn't yielded
> > > yet and was launched from the main thread.  Therefore the coroutine is
> > > guaranteed to be running in the main thread where block_job_completed()
> > > may be called safely.  This is very subtle so it's nice to eliminate the
> > > assumption by unifying the early exit with the normal exit code path.
> > >
> > > Cc: Fam Zheng <famz@redhat.com>
> > > Cc: Jeff Cody <jcody@redhat.com>
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > 
> > I had a slightly simpler version of this in my intermediate block
> > streaming series in case you're interested:
> > 
> >    https://patchwork.ozlabs.org/patch/471881/
> > 
> > But this one looks good to me too, so:
> > 
> > Reviewed-by: Alberto Garcia <berto@igalia.com>
> 
> Kevin, please take Alberto's patch instead of mine.  The Message-ID is:
> 
>   d575a576c18d8972ac1a200c4022b39cbbce2507.1435008395.git.berto@igalia.com
> 
> BTW, I notice that Jeff isn't listed as maintainer for block/stream.c.
> So according to MAINTAINERS this patch goes through you.
> 
> Stefan

I think that is probably just a typo - it lists block/stream.h in
MAINTAINERS, not block/stream.c.

      reply	other threads:[~2015-10-16 11:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 15:54 [Qemu-devel] [PATCH] block: fix memory leak in early exit Stefan Hajnoczi
2015-10-16  2:31 ` Fam Zheng
2015-10-16  3:34 ` Jeff Cody
2015-10-16  6:58 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2015-10-16  8:37   ` Stefan Hajnoczi
2015-10-16 11:31     ` Jeff Cody [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=20151016113158.GB3695@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=berto@igalia.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).