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

[Xen-changelog] [xen-unstable] xen/flask: fix crash on debugkey "i"


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Thu, 14 Feb 2013 19:44:11 +0000
  • Delivery-date: Thu, 14 Feb 2013 19:44:20 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1360775073 0
# Node ID c43be17eec0602015fc6461d1f13c992ba330c20
# Parent  97b7e546e2e4a021491e198a33f7d685550ebc73
xen/flask: fix crash on debugkey "i"

The IRQs beyond nr_static_irqs do not all have an associated PCI
device, so only query the device SID if pci is not NULL.

Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 97b7e546e2e4 -r c43be17eec06 xen/xsm/flask/hooks.c
--- a/xen/xsm/flask/hooks.c     Wed Feb 13 17:03:31 2013 +0000
+++ b/xen/xsm/flask/hooks.c     Wed Feb 13 17:04:33 2013 +0000
@@ -110,7 +110,7 @@ static int get_irq_sid(int irq, u32 *sid
         }
         return security_irq_sid(irq, sid);
     }
-    if ( desc->msi_desc ) {
+    if ( desc->msi_desc && desc->msi_desc->dev ) {
         struct pci_dev *dev = desc->msi_desc->dev;
         u32 sbdf = (dev->seg << 16) | (dev->bus << 8) | dev->devfn;
         if (ad) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.