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 <john.baboval@virtualcomputer.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
64b3cfdb73
commit
8c12f1912a
2
hw/pci.c
2
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);
|
pci_patch_ids(pdev, ptr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qemu_put_ram_ptr(ptr);
|
||||||
|
|
||||||
pci_register_bar(pdev, PCI_ROM_SLOT, size,
|
pci_register_bar(pdev, PCI_ROM_SLOT, size,
|
||||||
0, pci_map_option_rom);
|
0, pci_map_option_rom);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user