From patchwork Tue Mar 29 18:28:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 88848 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AA4D3B6F2B for ; Wed, 30 Mar 2011 06:48:12 +1100 (EST) Received: from localhost ([127.0.0.1]:60723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4e74-000719-Su for incoming@patchwork.ozlabs.org; Tue, 29 Mar 2011 14:57:58 -0400 Received: from [140.186.70.92] (port=57225 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4dfO-0007bm-4W for qemu-devel@nongnu.org; Tue, 29 Mar 2011 14:29:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4dfH-0003me-DK for qemu-devel@nongnu.org; Tue, 29 Mar 2011 14:29:16 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:7014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4dfH-0003gw-AK for qemu-devel@nongnu.org; Tue, 29 Mar 2011 14:29:15 -0400 X-IronPort-AV: E=Sophos;i="4.63,263,1299474000"; d="scan'208";a="142586941" Received: from ftlpexchmx01.citrite.net ([10.9.154.126]) by FTLPIPO02.CITRIX.COM with ESMTP; 29 Mar 2011 14:29:14 -0400 Received: from smtp01.ad.xensource.com ([10.219.128.104]) by FTLPEXCHMX01.citrite.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 29 Mar 2011 14:29:14 -0400 Received: from perard.uk.xensource.com (dhcp-3-28.uk.xensource.com [10.80.3.28]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id p2TISYWh028703; Tue, 29 Mar 2011 11:29:12 -0700 From: anthony.perard@citrix.com To: QEMU-devel , Anthony Liguori , Alexander Graf Date: Tue, 29 Mar 2011 19:28:06 +0100 Message-Id: <1301423290-12443-14-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1301423290-12443-1-git-send-email-anthony.perard@citrix.com> References: <1301423290-12443-1-git-send-email-anthony.perard@citrix.com> X-OriginalArrivalTime: 29 Mar 2011 18:29:14.0572 (UTC) FILETIME=[34C2C0C0:01CBEE3F] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: Anthony PERARD , John Baboval , Xen Devel , Stefano Stabellini Subject: [Qemu-devel] [PATCH V12 13/17] pci: Use of qemu_put_ram_ptr in pci_add_option_rom. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: John Baboval Prevent a deadlock caused by leaving a map cache bucket locked by the preceding qemu_get_ram_ptr() call. Signed-off-By: John Baboval Signed-off-by: Anthony PERARD --- hw/pci.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 6b577e1..2b24dd4 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1897,6 +1897,8 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom) pci_patch_ids(pdev, ptr, size); } + qemu_put_ram_ptr(ptr); + pci_register_bar(pdev, PCI_ROM_SLOT, size, 0, pci_map_option_rom);