|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3 of 3] xend: Don't crash due to weird PCI devices
# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
# Date 1333398413 14400
# Node ID f789a3effeb6f876b9672e6e64bbd98857f59b61
# Parent caefa03c38366c3e70d937bc95740c5d33c0892a
xend: Don't crash due to weird PCI devices
This fixes Red Hat BZ 767742 where a user had some truly
weird PCI devices:
$ lspci -vvv -xxx -s 0000:01:00.0
01:00.0 VGA compatible controller: nVidia Corporation GT218 [NVS 3100M] (rev
ff) (prog-if ff)
!!! Unknown header type 7f
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
And xend would report:
ERROR (pci:1272) Caught 'Looped capability chain: 0000:01:00.0'
This fixes it.
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
diff -r caefa03c3836 -r f789a3effeb6 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py Mon Apr 02 16:26:53 2012 -0400
+++ b/tools/python/xen/util/pci.py Mon Apr 02 16:26:53 2012 -0400
@@ -1268,7 +1268,12 @@ class PciDevice:
pass
def get_info_from_sysfs(self):
- self.find_capability(0x11)
+ try:
+ self.find_capability(0x11)
+ except PciDeviceParseError, err:
+ log.error("Caught '%s'" % err)
+ return False
+
sysfs_mnt = find_sysfs_mnt()
if sysfs_mnt == None:
return False
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |