diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-02-13 17:04:33 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-02-13 17:04:33 +0000 |
commit | 505023822fe48af3636fd6cdb1e689760831efac (patch) | |
tree | 544f966d5e8d2a0602d6e20e3184eaf3d0372fb5 /xen/xsm/flask | |
parent | 511278b4e239df00de7b33f7b42d8d5d7e52221b (diff) | |
download | xen-505023822fe48af3636fd6cdb1e689760831efac.tar.gz xen-505023822fe48af3636fd6cdb1e689760831efac.tar.bz2 xen-505023822fe48af3636fd6cdb1e689760831efac.zip |
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@tycho.nsa.gov>
Acked-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/xsm/flask')
-rw-r--r-- | xen/xsm/flask/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 85d009c42b..29a78dd06e 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -110,7 +110,7 @@ static int get_irq_sid(int irq, u32 *sid, struct avc_audit_data *ad) } 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) { |