Skip to content

Commit

Permalink
xen: fix memory access violation bug when CONFIG_HAVE_SPARSE_IRQ is e…
Browse files Browse the repository at this point in the history
…nabled

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>
  • Loading branch information
Alex Nixon authored and Ingo Molnar committed Oct 16, 2008
1 parent 9d6a4d0 commit 2b46b37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ static void init_evtchn_cpu_bindings(void)
/* By default all event channels notify CPU#0. */
for (i = 0; i < nr_irqs; i++) {
struct irq_desc *desc = irq_to_desc(i);
if (!desc)
continue;
desc->affinity = cpumask_of_cpu(0);
}
#endif
Expand Down

0 comments on commit 2b46b37

Please sign in to comment.