mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 06:51:53 -06:00
Fix do_pci_register_device() to reject devfn already in use
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
9391e4b882
commit
07b7d05377
1 changed files with 2 additions and 0 deletions
2
hw/pci.c
2
hw/pci.c
|
@ -267,6 +267,8 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
found: ;
|
found: ;
|
||||||
|
} else if (bus->devices[devfn]) {
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
pci_dev->bus = bus;
|
pci_dev->bus = bus;
|
||||||
pci_dev->devfn = devfn;
|
pci_dev->devfn = devfn;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue