aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-07-26 02:30:45 -0400
committerTony Luck <tony.luck@intel.com>2007-07-26 17:27:19 -0400
commit6bde71ec1ea1f37254892ef2058176f3171a0d62 (patch)
treec9dbd03737cea02ec7bd8a705c3c6e91d47af4f1 /arch/ia64
parentd941cf5e373c356723fa648b9f0302a11c9b1770 (diff)
[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>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/kernel/irq_ia64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index fcb77338cc09..8c2bd81acb26 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)
145 int cpu; 145 int cpu;
146 struct irq_cfg *cfg = &irq_cfg[irq]; 146 struct irq_cfg *cfg = &irq_cfg[irq];
147 147
148 BUG_ON((unsigned)irq >= NR_IRQS);
149 BUG_ON((unsigned)vector >= IA64_NUM_VECTORS);
150
148 cpus_and(mask, domain, cpu_online_map); 151 cpus_and(mask, domain, cpu_online_map);
149 if (cpus_empty(mask)) 152 if (cpus_empty(mask))
150 return -EINVAL; 153 return -EINVAL;