Skip to content

Commit

Permalink
[IA64] Add sanity check into __bind_irq_vector
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kenji Kaneshige authored and Tony Luck committed Jul 26, 2007
1 parent d941cf5 commit 6bde71e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/ia64/kernel/irq_ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6bde71e

Please sign in to comment.