aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorAlex Nixon <alex.nixon@citrix.com>2008-08-19 23:50:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:58 -0400
commit2b46b37de73296018da02c2a421ac2a9cbccfa9f (patch)
tree58751acf11501ba9a755bae9ed689898e1f75291 /drivers/xen
parent9d6a4d0823b3b8e29156f5e698b5a68687afad32 (diff)
xen: fix memory access violation bug when CONFIG_HAVE_SPARSE_IRQ is enabled
When sparse IRQs are enabled, it is not safe to assume an IRQ descriptor exists for every possible IRQ. This patch causes init_evtchn_cpu_bindings to skip initialisation of IRQ descriptors which don't exist. Signed-off-by: Alex Nixon <alex.nixon@citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 56ace47f24d6..e6d47e8ca1ac 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -141,6 +141,8 @@ static void init_evtchn_cpu_bindings(void)
141 /* By default all event channels notify CPU#0. */ 141 /* By default all event channels notify CPU#0. */
142 for (i = 0; i < nr_irqs; i++) { 142 for (i = 0; i < nr_irqs; i++) {
143 struct irq_desc *desc = irq_to_desc(i); 143 struct irq_desc *desc = irq_to_desc(i);
144 if (!desc)
145 continue;
144 desc->affinity = cpumask_of_cpu(0); 146 desc->affinity = cpumask_of_cpu(0);
145 } 147 }
146#endif 148#endif