[IA64] Add sanity check into __bind_irq_vector
Add some sanity checks into __bind_irq_vector().
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index fcb7733..8c2bd81 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -145,6 +145,9 @@
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;