From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn3F0-0002Ol-Me for qemu-devel@nongnu.org; Fri, 16 Oct 2015 07:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn3Ez-0003Pw-Fg for qemu-devel@nongnu.org; Fri, 16 Oct 2015 07:32:06 -0400 Date: Fri, 16 Oct 2015 07:31:58 -0400 From: Jeff Cody Message-ID: <20151016113158.GB3695@localhost.localdomain> References: <1444924467-26433-1-git-send-email-stefanha@redhat.com> <20151016083717.GC7432@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151016083717.GC7432@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block: fix memory leak in early exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Alberto Garcia , Fam Zheng , qemu-devel@nongnu.org, qemu-block@nongnu.org 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 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 > > > Cc: Jeff Cody > > > Signed-off-by: Stefan Hajnoczi > > > > 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 > > 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.