Received: from eggs.gnu.org ([2001:4830:134:3::10]:39469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEKgo-0000er-Rv for qemu-devel@nongnu.org; Fri, 14 Feb 2014 10:28:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEKgj-0006qP-HE for qemu-devel@nongnu.org; Fri, 14 Feb 2014 10:28:30 -0500 Received: from mail-we0-x234.google.com ([2a00:1450:400c:c03::234]:56495) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEKgj-0006qJ-A9 for qemu-devel@nongnu.org; Fri, 14 Feb 2014 10:28:25 -0500 Received: by mail-we0-f180.google.com with SMTP id u57so8796927wes.39 for ; Fri, 14 Feb 2014 07:28:24 -0800 (PST) Date: Fri, 14 Feb 2014 16:28:21 +0100 From: Stefan Hajnoczi Message-ID: <20140214152821.GT17391@stefanha-thinkpad.redhat.com> References: <20aba630c8a70a11c19404ca7020f3bd6c42f21e.1392301375.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20aba630c8a70a11c19404ca7020f3bd6c42f21e.1392301375.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block: mirror - use local_err to avoid NULL errp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com On Thu, Feb 13, 2014 at 09:23:38AM -0500, Jeff Cody wrote: > When starting a block job, commit_active_start() relies on whether *errp > is set by mirror_start_job. This allows it to determine if the mirror > job start failed, so that it can clean up any changes to open flags from > the bdrv_reopen(). If errp is NULL, then it will not be able to > determine if mirror_start_job failed or not. > > To avoid this, use a local Error variable, and then propagate the error > (if any) to errp. > > Reported-by: Markus Armbruster > Signed-off-by: Jeff Cody > --- > block/mirror.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan