]> git.proxmox.com Git - qemu.git/commitdiff
pci: Use of qemu_put_ram_ptr in pci_add_option_rom.
authorJohn Baboval <john.baboval@virtualcomputer.com>
Tue, 22 Mar 2011 14:52:09 +0000 (14:52 +0000)
committerAlexander Graf <agraf@suse.de>
Sun, 8 May 2011 08:10:01 +0000 (10:10 +0200)
Prevent a deadlock caused by leaving a map cache bucket locked by the
preceding qemu_get_ram_ptr() call.

Signed-off-By: John Baboval <john.baboval@virtualcomputer.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/pci.c

index 0875654253f30c7dc3f3b8322b065891c9175809..631d77cccb1be17a01a76788c38212e1effb0f13 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1922,6 +1922,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);