qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 09/16] pci-assign: assignment should fail if we can'


From: Laszlo Ersek
Subject: [Qemu-devel] [PATCH 09/16] pci-assign: assignment should fail if we can't read config space
Date: Thu, 10 Apr 2014 10:24:38 +0200

assigned_initfn()
  get_real_device()
    read()

Signed-off-by: Laszlo Ersek <address@hidden>
---
 hw/i386/kvm/pci-assign.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index f91d4fb..e89bb6a 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -574,10 +574,11 @@ again:
     if (r < 0) {
         if (errno == EINTR || errno == EAGAIN) {
             goto again;
         }
         error_report("%s: read failed, errno = %d", __func__, errno);
+        return 1;
     }
 
     /* Restore or clear multifunction, this is always controlled by qemu */
     if (pci_dev->dev.cap_present & QEMU_PCI_CAP_MULTIFUNCTION) {
         pci_dev->dev.config[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION;
-- 
1.8.3.1





reply via email to

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