diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2007-07-26 06:30:45 (GMT) |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-07-26 21:27:19 (GMT) |
commit | 6bde71ec1ea1f37254892ef2058176f3171a0d62 (patch) | |
tree | c9dbd03737cea02ec7bd8a705c3c6e91d47af4f1 /arch/ia64 | |
parent | d941cf5e373c356723fa648b9f0302a11c9b1770 (diff) | |
download | linux-fsl-qoriq-6bde71ec1ea1f37254892ef2058176f3171a0d62.tar.xz |
[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.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 fcb7733..8c2bd81 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; |