Xen: Fix memory access violation bug when CONFIG_HAVE_SPARSE_IRQ is enabled
Jeremy Fitzhardinge
Acked-byQuoted 8 lines · Alex Nixon
From: Alex Nixon <[email protected]>
Date: Mon, 18 Aug 2008 14:15:11 +0100
Subject: [PATCH] Xen: Fix memory access violation bug whenCONFIG_HAVE_SPARSE_IRQis enabledWhen sparse IRQs are enabled, it is not safe to assume an IRQ descriptor exists for every possible IRQ. This patch causes
init_evtchn_cpu_bindingsto skip initialisation of IRQ descriptors which don't exist.Signed-off-by Alex Nixon <[email protected]>
Thanks again, Alex.
Ingo, please apply.
Quoted 18 lines
--- drivers/xen/events.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)drivers/xen/events.c +2
-0@@ -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 =to_irq_desc (i); +if (!desc) +continue ; desc->affinity =cpumask_of_cpu (0 ); }#endif