From patchwork Thu Aug 11 21:27:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 109690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CCB62B6F7F for ; Fri, 12 Aug 2011 07:27:39 +1000 (EST) Received: from localhost ([::1]:44088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrcmt-0006bz-8Z for incoming@patchwork.ozlabs.org; Thu, 11 Aug 2011 17:27:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33199) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrcmo-0006bo-JH for qemu-devel@nongnu.org; Thu, 11 Aug 2011 17:27:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qrcmn-0004Vo-2W for qemu-devel@nongnu.org; Thu, 11 Aug 2011 17:27:30 -0400 Received: from ch1ehsobe001.messaging.microsoft.com ([216.32.181.181]:41726 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrcmm-0004VQ-Ud for qemu-devel@nongnu.org; Thu, 11 Aug 2011 17:27:29 -0400 Received: from mail59-ch1-R.bigfish.com (216.32.181.169) by CH1EHSOBE017.bigfish.com (10.43.70.67) with Microsoft SMTP Server id 14.1.225.22; Thu, 11 Aug 2011 21:27:27 +0000 Received: from mail59-ch1 (localhost.localdomain [127.0.0.1]) by mail59-ch1-R.bigfish.com (Postfix) with ESMTP id 44B91144812E; Thu, 11 Aug 2011 21:27:27 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h944h61h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail59-ch1 (localhost.localdomain [127.0.0.1]) by mail59-ch1 (MessageSwitch) id 1313098047152329_2002; Thu, 11 Aug 2011 21:27:27 +0000 (UTC) Received: from CH1EHSMHS016.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.254]) by mail59-ch1.bigfish.com (Postfix) with ESMTP id 14823145804B; Thu, 11 Aug 2011 21:27:27 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS016.bigfish.com (10.43.70.16) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 11 Aug 2011 21:27:18 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.323.2; Thu, 11 Aug 2011 16:27:17 -0500 Received: from schlenkerla.am.freescale.net (gentooten.am.freescale.net [10.82.121.12]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p7BLRFJH028345; Thu, 11 Aug 2011 16:27:16 -0500 (CDT) Date: Thu, 11 Aug 2011 16:27:15 -0500 From: Scott Wood To: Message-ID: <20110811212715.GA28821@schlenkerla.am.freescale.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP2+, XP SP1+ (seldom 98) X-Received-From: 216.32.181.181 Cc: Kevin Wolf , Alexander Graf Subject: [Qemu-devel] [PATCH] qcow: initialize coroutine mutex X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org commit 52b8eb60132b27ad53476490e9d7579003390cfa added a mutex, but never initialized it. This caused a segfault. Reported-by: Alexander Graf Signed-off-by: Scott Wood --- block/qcow.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 6447c2a..e46f15f 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -159,6 +159,8 @@ static int qcow_open(BlockDriverState *bs, int flags) goto fail; bs->backing_file[len] = '\0'; } + + qemu_co_mutex_init(&s->lock); return 0; fail: