From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xensource.com, Ian.Jackson@eu.citrix.com,
stefano.stabellini@eu.citrix.com, Ian.Campbell@citrix.com,
jbeulich@suse.com
Cc: konrad.wilk@oracle.com
Subject: [PATCH 3 of 3] xend: Don't crash due to weird PCI devices
Date: Mon, 02 Apr 2012 16:27:27 -0400 [thread overview]
Message-ID: <f789a3effeb6f876b967.1333398447@phenom.dumpdata.com> (raw)
In-Reply-To: <patchbomb.1333398444@phenom.dumpdata.com>
# HG changeset patch
# User Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
# 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@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
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
prev parent reply other threads:[~2012-04-02 20:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 20:27 [PATCH 0 of 3] Patches for Xen 4.2 (v2) Konrad Rzeszutek Wilk
2012-04-02 20:27 ` [PATCH 1 of 3] xen/vga: Add 'vga_delay' parameter to delay screen output by X miliseconds per line Konrad Rzeszutek Wilk
2012-04-03 7:14 ` Jan Beulich
2012-04-03 8:07 ` Ian Campbell
2012-04-02 20:27 ` [PATCH 2 of 3] xen/pat: After suspend re-write PAT if BIOS changed it Konrad Rzeszutek Wilk
2012-04-03 7:16 ` Jan Beulich
2012-04-02 20:27 ` Konrad Rzeszutek Wilk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f789a3effeb6f876b967.1333398447@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).