Commit 2b46b37d authored by Alex Nixon's avatar Alex Nixon Committed by Ingo Molnar

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: default avatarAlex Nixon <alex.nixon@citrix.com>
Acked-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 9d6a4d08
...@@ -141,6 +141,8 @@ static void init_evtchn_cpu_bindings(void) ...@@ -141,6 +141,8 @@ static void init_evtchn_cpu_bindings(void)
/* By default all event channels notify CPU#0. */ /* By default all event channels notify CPU#0. */
for (i = 0; i < nr_irqs; i++) { for (i = 0; i < nr_irqs; i++) {
struct irq_desc *desc = irq_to_desc(i); struct irq_desc *desc = irq_to_desc(i);
if (!desc)
continue;
desc->affinity = cpumask_of_cpu(0); desc->affinity = cpumask_of_cpu(0);
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment