From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYAID-0005Q7-Tw for qemu-devel@nongnu.org; Thu, 10 Apr 2014 04:25:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYAI6-0003Lo-Ux for qemu-devel@nongnu.org; Thu, 10 Apr 2014 04:25:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYAI6-0003Lj-Mj for qemu-devel@nongnu.org; Thu, 10 Apr 2014 04:24:58 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s3A8Owsb013862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 10 Apr 2014 04:24:58 -0400 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s3A8OlIZ005705 for ; Thu, 10 Apr 2014 04:24:57 -0400 From: Laszlo Ersek Date: Thu, 10 Apr 2014 10:24:38 +0200 Message-Id: <1397118285-11715-10-git-send-email-lersek@redhat.com> In-Reply-To: <1397118285-11715-1-git-send-email-lersek@redhat.com> References: <1397118285-11715-1-git-send-email-lersek@redhat.com> Subject: [Qemu-devel] [PATCH 09/16] pci-assign: assignment should fail if we can't read config space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org assigned_initfn() get_real_device() read() Signed-off-by: Laszlo Ersek --- 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