mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'kraxel/CVE-2011-1751' into staging
This commit is contained in:
+3
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user