diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2007-07-26 02:30:45 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-07-26 17:27:19 -0400 |
commit | 6bde71ec1ea1f37254892ef2058176f3171a0d62 (patch) | |
tree | c9dbd03737cea02ec7bd8a705c3c6e91d47af4f1 | |
parent | d941cf5e373c356723fa648b9f0302a11c9b1770 (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>
-rw-r--r-- | arch/ia64/kernel/irq_ia64.c | 3 |
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; |