qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/4] Fix do_pci_register_device() to reject devfn al


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 1/4] Fix do_pci_register_device() to reject devfn already in use
Date: Thu, 18 Jun 2009 15:14:07 +0200

Signed-off-by: Markus Armbruster <address@hidden>
---
 hw/pci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index 0a738db..36c92d7 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -251,6 +251,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;
-- 
1.6.0.6





reply via email to

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