summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorIan Campbell2011-02-03 10:49:35 +0100
committerKonrad Rzeszutek Wilk2011-03-03 18:00:27 +0100
commit7214610475b2847a81478d96e4d3ba0bbe49598c (patch)
tree23d1751896bca0be6d90c59e81d1b41db6001114 /drivers/xen
parentxen: events: allocate GSIs and dynamic IRQs from separate IRQ ranges. (diff)
downloadkernel-qcow2-linux-7214610475b2847a81478d96e4d3ba0bbe49598c.tar.gz
kernel-qcow2-linux-7214610475b2847a81478d96e4d3ba0bbe49598c.tar.xz
kernel-qcow2-linux-7214610475b2847a81478d96e4d3ba0bbe49598c.zip
xen: events: do not free legacy IRQs
c514d00c8057 "xen: events: add xen_allocate_irq_{dynamic, gsi} and xen_free_irq" correctly avoids reallocating legacy IRQs (which are managed by the arch core) but erroneously did not prevent them being freed. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 06f2e61de691..accb37ad0944 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -434,6 +434,10 @@ static int xen_allocate_irq_gsi(unsigned gsi)
static void xen_free_irq(unsigned irq)
{
+ /* Legacy IRQ descriptors are managed by the arch. */
+ if (irq < NR_IRQS_LEGACY)
+ return;
+
irq_free_desc(irq);
}