[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH] block: fix memory leak in early ex
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH] block: fix memory leak in early exit |
Date: |
Fri, 16 Oct 2015 07:31:58 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden> 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 <address@hidden>
> > > Cc: Jeff Cody <address@hidden>
> > > Signed-off-by: Stefan Hajnoczi <address@hidden>
> >
> > 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 <address@hidden>
>
> Kevin, please take Alberto's patch instead of mine. The Message-ID is:
>
> address@hidden
>
> 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.