From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: [PATCH V15 14/18] pci: Use of qemu_put_ram_ptr in pci_add_option_rom. Date: Thu, 5 May 2011 11:58:29 +0100 Message-ID: <1304593113-10689-15-git-send-email-anthony.perard@citrix.com> References: <1304593113-10689-1-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1304593113-10689-1-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: QEMU-devel , Anthony Liguori , Alexander Graf Cc: Anthony PERARD , John Baboval , Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.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); -- 1.7.2.5