aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-07-26 15:30:45 +0900
committerTony Luck <tony.luck@intel.com>2007-07-26 14:27:19 -0700
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 fcb77338cc0..8c2bd81acb2 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;