summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-05-25 07:04:13 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-05-25 07:04:13 -0500
commitaa29141d84d58171c2d219f0a4b599bd76fb2e37 (patch)
tree77c0f44325e3833872085c54c58f0620dfe3a37b
parent6093d3d4ec873c93092d05d5ecc703aba8029efd (diff)
parent505597e4476a6bc219d0ec1362b760d71cb4fdca (diff)
downloadfocaccia-qemu-aa29141d84d58171c2d219f0a4b599bd76fb2e37.tar.gz
focaccia-qemu-aa29141d84d58171c2d219f0a4b599bd76fb2e37.zip
Merge remote-tracking branch 'kraxel/CVE-2011-1751' into staging
-rw-r--r--hw/acpi_piix4.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 96f522233a..6c908ff00b 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -471,11 +471,13 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val)
     BusState *bus = opaque;
     DeviceState *qdev, *next;
     PCIDevice *dev;
+    PCIDeviceInfo *info;
     int slot = ffs(val) - 1;
 
     QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) {
         dev = DO_UPCAST(PCIDevice, qdev, qdev);
-        if (PCI_SLOT(dev->devfn) == slot) {
+        info = container_of(qdev->info, PCIDeviceInfo, qdev);
+        if (PCI_SLOT(dev->devfn) == slot && !info->no_hotplug) {
             qdev_free(qdev);
         }
     }