qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 07b7d05] Fix do_pci_register_device() to reject


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 07b7d05] Fix do_pci_register_device() to reject devfn alreadyin use
Date: Mon, 22 Jun 2009 15:51:08 -0000

From: Markus Armbruster <address@hidden>

Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/pci.c b/hw/pci.c
index 140cdba..da76ecd 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -267,6 +267,8 @@ static PCIDevice *do_pci_register_device(PCIDevice 
*pci_dev, PCIBus *bus,
         }
         return NULL;
     found: ;
+    } else if (bus->devices[devfn]) {
+        return NULL;
     }
     pci_dev->bus = bus;
     pci_dev->devfn = devfn;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]