forked from luck/tmp_suning_uos_patched
[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>
This commit is contained in:
parent
d941cf5e37
commit
6bde71ec1e
@ -145,6 +145,9 @@ static int __bind_irq_vector(int irq, int vector, cpumask_t domain)
|
|||||||
int cpu;
|
int cpu;
|
||||||
struct irq_cfg *cfg = &irq_cfg[irq];
|
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);
|
cpus_and(mask, domain, cpu_online_map);
|
||||||
if (cpus_empty(mask))
|
if (cpus_empty(mask))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user