From 753e0bab19a11bede74c7677ce6938a09c84dedd Mon Sep 17 00:00:00 2001 From: John Baboval Date: Tue, 22 Mar 2011 14:52:09 +0000 Subject: [PATCH] pci: Use of qemu_put_ram_ptr in pci_add_option_rom. 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 Signed-off-by: Alexander Graf --- hw/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci.c b/hw/pci.c index 0875654..631d77c 100644 --- 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); -- 2.7.4