diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2007-07-26 15:30:45 +0900 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-07-26 14:27:19 -0700 |
commit | 6bde71ec1ea1f37254892ef2058176f3171a0d62 (patch) | |
tree | c9dbd03737cea02ec7bd8a705c3c6e91d47af4f1 /arch/ia64 | |
parent | d941cf5e373c356723fa648b9f0302a11c9b1770 (diff) | |
download | linux-6bde71ec1ea1f37254892ef2058176f3171a0d62.tar.gz linux-6bde71ec1ea1f37254892ef2058176f3171a0d62.tar.bz2 linux-6bde71ec1ea1f37254892ef2058176f3171a0d62.zip |
[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 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) 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; |