From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlGhE-0002RS-T3 for qemu-devel@nongnu.org; Thu, 12 Jan 2012 04:11:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlGh9-0007Uy-Ed for qemu-devel@nongnu.org; Thu, 12 Jan 2012 04:11:44 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:47992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlGh9-0007Ub-7l for qemu-devel@nongnu.org; Thu, 12 Jan 2012 04:11:39 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Jan 2012 09:11:37 -0000 Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0C9BXc22621492 for ; Thu, 12 Jan 2012 09:11:33 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0C9BXYO029531 for ; Thu, 12 Jan 2012 02:11:33 -0700 Date: Thu, 12 Jan 2012 09:11:32 +0000 From: Stefan Hajnoczi Message-ID: <20120112091132.GA4913@stefanha-thinkpad.localdomain> References: <1325858501-25741-1-git-send-email-stefanha@linux.vnet.ibm.com> <1325858501-25741-5-git-send-email-stefanha@linux.vnet.ibm.com> <20120111151828.1e9fd72d@doriath> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120111151828.1e9fd72d@doriath> Subject: Re: [Qemu-devel] [PATCH v4 04/15] block: add image streaming block job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Kevin Wolf , Marcelo Tosatti , qemu-devel@nongnu.org On Wed, Jan 11, 2012 at 03:18:28PM -0200, Luiz Capitulino wrote: > On Fri, 6 Jan 2012 14:01:30 +0000 > Stefan Hajnoczi wrote: > > +int stream_start(BlockDriverState *bs, BlockDriverState *base, > > + BlockDriverCompletionFunc *cb, void *opaque) > > +{ > > + StreamBlockJob *s; > > + Coroutine *co; > > + > > + if (bs->job) { > > + return -EBUSY; > > + } > > + > > + s = block_job_create(&stream_job_type, bs, cb, opaque); > > + s->base = base; > > This is missing a check against NULL. Good catch.