From: Kenji Kaneshige Date: Thu, 26 Jul 2007 06:30:45 +0000 (+0900) Subject: [IA64] Add sanity check into __bind_irq_vector X-Git-Tag: v2.6.23-rc2~188 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6bde71ec1ea1f37254892ef2058176f3171a0d62;p=linux-2.6-omap-h63xx.git [IA64] Add sanity check into __bind_irq_vector Add some sanity checks into __bind_irq_vector(). Signed-off-by: Kenji Kaneshige Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index fcb77338cc0..8c2bd81acb2 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -145,6 +145,9 @@ static int __bind_irq_vector(int irq, int vector, cpumask_t domain) int cpu; struct irq_cfg *cfg = &irq_cfg[irq]; + BUG_ON((unsigned)irq >= NR_IRQS); + BUG_ON((unsigned)vector >= IA64_NUM_VECTORS); + cpus_and(mask, domain, cpu_online_map); if (cpus_empty(mask)) return -EINVAL;