mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
Merge remote-tracking branch 'kraxel/CVE-2011-1751' into staging
This commit is contained in:
commit
aa29141d84
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user