From 2b46b37de73296018da02c2a421ac2a9cbccfa9f Mon Sep 17 00:00:00 2001 From: Alex Nixon Date: Tue, 19 Aug 2008 20:50:53 -0700 Subject: 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 Acked-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar --- drivers/xen/events.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/xen/events.c') 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) /* 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 -- cgit v1.2.2